Solr 多重过滤器标记/排除
我正在尝试为 Solr 搜索应用过滤器标记Tagging_and_execution_Filters。
挑战是同时应用多个标记(对于单个页面上的多个选择选项)。例如
q=mainquery&fq=status:public&fq={!tag=dt}doctype:pdf&fq={!tag=doc}document:1&facet=on&facet.field={!ex= dt}doctype&facet.field={!ex=doc}document
但由于某种原因,排除仅适用于一个过滤器,而其他过滤器则不会被注意到。我的语法有问题吗?谁能建议更好的方法?
I am trying to apply filter tagging for Solr search Tagging_and_excluding_Filters.
The challenge is to apply multiple tagging at the same time (for multiple select options on a single page). e.g.
q=mainquery&fq=status:public&fq={!tag=dt}doctype:pdf&fq={!tag=doc}document:1&facet=on&facet.field={!ex=dt}doctype&facet.field={!ex=doc}document
But for some reason excluding works only for one filter and other gets unnoticed. Is there any problem with my syntax? Can anyone suggest a better method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有一个类似的问题需要解决,它似乎只需使用逗号分隔排除的标签即可工作:
来自: http://wiki.apache.org/solr/SimpleFacetParameters#facet.field
所以我想你会像这样使用它:
{!ex=doc,dt}
I'm having a similiar problem to solve and it seemed to work by just using a comma to seperate excluded tags:
From: http://wiki.apache.org/solr/SimpleFacetParameters#facet.field
So I guess you'd use it like:
{!ex=doc,dt}
这个答案可能不及时,但我认为这应该可以解决您的问题。
尝试在两个 ex 子句中添加两个标签。
我这样做了,并且它对我类似的案例很有用。
This answer may not be timely, but i think this should resolve your issue.
Try adding both the tags in both the ex clauses.
I did that and it worked for me for a similar case.
可能是 http://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams 部分
比您提到的更能帮助您。
此致!
Possibly the http://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams section
would help you further than the from you mentioned one.
Best regards!