0

我正在尝试实现 Solr 方面搜索功能并通过 url 在服务器上测试我的查询。当我运行这个查询


http://localhost:8080/solr3/core0/select?indent=on&version=2.2&q=ipad&facet.field=brand&facet=on


我得到类似的东西


...<lst name="facet_counts"><lst name="facet_queries"/><lst name="facet_fields"><lst name="brand"><int name="Apple">37</int>


但是当我apple用作方面查询时


http://localhost:8080/solr3/core0/select?indent=on&version=2.2&q=ipad&facet.field=brand&facet=on&fq=apple


我希望得到 37 个结果,但查询返回<result name="response" numFound="402" start="0">

我在这里错过了什么吗?

谢谢

4

1 回答 1

2

这是您应用过滤器的方式: q=ipad&fq=brand:apple

除非您想要多选构面,否则不要重复构面(即使那样,它也比这更复杂)。

于 2011-12-14T12:57:51.080 回答