0
votes

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">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

1

1 Answers

0
votes

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)