how to search for more than one facet in solr?

一个人想着一个人 提交于 2019-12-06 00:30:32

You can use boolean operators to filter the results.

OR - fq=country:(USA OR canada)&fq=topic:(political OR industrial)

AND - fq=country:(USA AND canada)&fq=topic:(political AND industrial)

This sort of thing would be even easier if the Solr devs implement this feature request:

https://issues.apache.org/jira/browse/SOLR-1223

It like it because then each fq can be specified (and cached) separately and the AND/OR logic of the fq's is separated out. Your case is pretty straightforward and the above answer just fine, but when you get some nasty fq's simply AND'ing them all together is not powerful enough.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!