Field value faceting is the most common type of faceting. The first example in this chapter demonstrated it in action. Solr, in essence, iterates over all of the indexed terms for the field and tallies a count for the number of searched documents that include the term. Sophisticated algorithms and caching makes this so fast that its overhead is usually negligible.
The following are the request parameters to use it:
facet.field
: You must set this parameter to a field's name in order to facet on that field. Repeat this parameter for each field to be faceted on. See the previous Field requirements section.Note
The remaining faceting parameters can be set on a per-field basis, otherwise they apply to all faceted fields that don't have a field-specific setting. You will usually specify them per field, especially if you are faceting on more than one field, so that you don't get your faceting configuration mixed up. For example:
f.r_type.facet.sort=index
(r_type
is a field name...