Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by HossMan: http://wiki.apache.org/solr/SimpleFacetParameters ------------------------------------------------------------------------------ - /!\ :TODO: /!\ fill in the blanks - Solr provides a [http://incubator.apache.org/solr/docs/api/org/apache/solr/request/SimpleFacets.html Simple Faceting toolkit] which can be reused by various Request Handlers to include "Facet counts" of based on some simple criteria. Both the StandardRequestHandler and the DisMaxRequestHandler currently use these utilities, and support the following parameters. Some parameters may be overriden on a per-field basis with the following syntax: `f.<fieldName>.<originalParam>=<value>` - eg. `f.contents.hl.snippets=2` + eg. `f.category.facet.limit=5` [[TableOfContents]] + = Parameters = == facet == + Set to "true" this param enables facet counts in the query response. Any blank or missing value, or "false" will disable faceting. + + The default value is blank. + == facet.query == + + This param allows you to specify an arbitrary query in the Lucene default syntax to generate a facet count. It can be particularly usefull for numeric range based facets, or prefix based facets. + + This parameter can be specified multiple times to inidicate that multiple queries should be used as separate facet constraints == facet.field == + This param allows you to specify a field which should be treated as a facet. It will iterate over each Term in the field and generate a facet count using that Term as the constraint. + + This parameter can be specified multiple times to indicate multiple facet fields. == facet.limit == + This param indicates the maximum number of constraint counts that should be returned for the facet fields. If a non blnk value is specified, the constraints (ie: Terms) will be sorted by the facet count (descending) and only the top N terms will be returned with their counts. + + The default value is blank. + + This parameter can be specified on a per field basis to indicate a seperate limit for certain fields. + == facet.zeros == + + Set to "true" this param indicates that constraint counts for facet fields should be included even if the count is "0", set to "false" or blank and the "0" counts will be supressed to save on the amount of data returned in the response. + + The default value is "true". + + This parameter can be specified on a per field basis. == facet.missing == + Set to "true" this param indicates that in addition to the Term based constraints of a facet field, a count of all matching results which have no value for the field should be computed + + The default value is blank. + + This parameter can be specified on a per field basis. + + + = Examples = + + /!\ :TODO: /!\ fill in the blanks +
