lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrFacetingOverview" by DavidGreen
Date Sun, 30 Jan 2011 04:03:47 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrFacetingOverview" page has been changed by DavidGreen.
http://wiki.apache.org/solr/SolrFacetingOverview?action=diff&rev1=18&rev2=19

--------------------------------------------------

  == FacetFields ==
  Any number of [[SimpleFacetParameters#facet.field|facet.field]] parameters can be passed
to the request handler.  For each facet.field, one of two approaches will be used based on
the [[SimpleFacetParameters#facet.method|facet.method]] or the field type:
  
-  * '''Enum Based Field Queries''':  If {{{facet.method=enum}}} or the field is defined in
the schema as boolean, then Solr will iterate over all of the indexed terms for the field,
and for each term it will get a filter from the filterCache and calculate the intersection
with the filter for the base query.  This is excellent for fields where there is a small set
of distinct values.  The average number of values per document does not matter.  For example,
faceting on a field with U.S. States e.g. `Alabama, Alaska, ... Wyoming` would lead to fifty
cached filters which would be used over and over again. The [[SolrCaching#filterCache|filterCache]]
should be large enough to hold all of the cached filters.
+  * '''Enum Based Field Queries''':  If {{{facet.method=enum}}} or the field is defined in
the schema as boolean, then Solr will iterate over all of the indexed terms for the field,
and for each term it will get a filter from the filterCache and calculate the intersection
with the filter for the base query.  This is excellent for fields where there is a small set
of distinct values.  The average number of values per document does not matter. ([[http://www.nicetick.com/|Air
Jordan 2]]). For example, faceting on a field with U.S. States e.g. `Alabama, Alaska, ...
Wyoming` would lead to fifty cached filters which would be used over and over again. The [[SolrCaching#filterCache|filterCache]]
should be large enough to hold all of the cached filters.
  
   * '''Field Cache''': If {{{facet.method=fc}}} then a field-cache approach will be used.
 This is currently implemented using either the the Lucene [[http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc/all/org/apache/lucene/search/FieldCache.html|FieldCache]]
or (starting in Solr 1.4) an !UnInvertedField if the field either is multi-valued or is tokenized
(according to FieldType.isTokened()). Each document is looked up in the cache to see what
terms/values it contains, and a tally is incremented for each value.  This is excellent for
situations where the number of indexed values for the field is high, but the number of values
per document is low.  For multi-valued fields, a hybrid approach is used that uses term filters
from the filterCache for terms that match many documents.
  

Mime
View raw message