Package org.apache.lucene.facet

faceted search

This module provides multiple methods for computing facet counts and value aggregations:

At search time you first run your search, but pass a FacetsCollector to gather all hits (and optionally, scores for each hit). Then, instantiate whichever facet methods you'd like to use to compute aggregates. Finally, all methods implement a common Facets base API that you use to obtain specific facet counts.

The various FacetsCollector.search(org.apache.lucene.search.IndexSearcher, org.apache.lucene.search.Query, int, org.apache.lucene.search.Collector) utility methods are useful for doing an "ordinary" search (sorting by score, or by a specified Sort) but also collecting into a FacetsCollector for subsequent faceting.