Yangrui
Yangrui

Reputation: 1247

How to use Solr's facet for navigation

I'm new to Solr's faceting. The facet section in the search response sees only contain facet terms and counts, no documents associated. Now, if I would like to find a document which belongs to a facet, do I need to pass the facet in the search query and do the search over again? what is the best way to use facets? Thanks

Upvotes: 0

Views: 35

Answers (1)

Toke Eskildsen
Toke Eskildsen

Reputation: 729

Yes, you have to issue a new search, typically by adding a filter query, in the form of myfacetfield:"facetterm" to your original request.

If you want the documents belonging to each aggregation bucket delivered up front, you can use grouping instead.

Upvotes: 2

Related Questions