A faceted search drills down to filter search results that are based on a category of
data.
A faceted search drills down to filter search results that are based on a category of
data.
Procedure
Run a complex query and include facet parameters in the
request.
-
In the Solr Admin query form, specify a family size of 9 in the main query
parameter text entry box--q:
-
In sort, specify sorting by age in ascending order,
youngest to oldest:
-
In fl (filter list), specify returning only age and
family size in results:
Results from the main query will include only data about families of 9.
-
Click the facet option.
Text entry boxes for entering facet parameter values
appear.
-
In facet.field, type this value:
The number of people in each age group will appear toward the end of the query
results.
-
Click Execute Query.
The numfound value shows that 186 families having nine members were
found. The query results include only results from the fields in the filter
list, age and family_size.
-
Scroll to the end of the query form to see the facet results.
The facet results show 11 people of age 17, 10 of age 34, and so on.
You can learn more about faceting from Solr documentation.