开发者

How to query in solr using facet value

开发者 https://www.devze.com 2023-04-03 06:59 出处:网络
I have following facet value- facetname1 -value11 ,value12, value 13 facetname2 - value21, value22 , value 23

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

精彩评论

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

关注公众号