开发者

How to query in solr using facet value

I have following facet value-

facetname1 -value11 ,value12, value 13

facetname2 - value21, value22 , value 23

User has selected values value12, value23 from the UI page.I just have these values and I want to query solr using these facet values.. From SolrJ API's how can I find the name of facet from its value and how can I query it from solr indexes.. Thanks in advance

More Info

 <lst name="facetname1">
<int name="value11">57270</int>
<int name="value12">开发者_JS百科30125</int>
<int> name="value13">19552</int>
</lst>

I can see this information by typing http://localhost:8080/requesthandlername That requesthandler contain name of each facets


From SolrJ API's how can I find the name of facet from its value

No, it's up to you to keep track of the facet fields and values. You should submit both the facet field and the selected facet value.

how can I query it from solr

If you mean how to "turn" facets into queries, use filter queries. In SolrJ, use the setFilterQueries method (many examples)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜