|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.Collector org.apache.lucene.facet.search.FacetsCollector
public abstract class FacetsCollector
A Collector
which executes faceted search and computes the weight of
requested facets. To get the facet results you should call
getFacetResults()
.
create(FacetSearchParams, IndexReader, TaxonomyReader)
returns the
most optimized FacetsCollector
for the given parameters.
Nested Class Summary | |
---|---|
static class |
FacetsCollector.MatchingDocs
Holds the documents that were matched in the AtomicReaderContext . |
Field Summary | |
---|---|
protected List<FacetsCollector.MatchingDocs> |
matchingDocs
|
Constructor Summary | |
---|---|
protected |
FacetsCollector(FacetsAccumulator accumulator)
|
Method Summary | |
---|---|
static FacetsCollector |
create(FacetsAccumulator accumulator)
Creates a FacetsCollector that satisfies the requirements of the
given FacetsAccumulator . |
static FacetsCollector |
create(FacetSearchParams fsp,
IndexReader indexReader,
TaxonomyReader taxoReader)
Creates a FacetsCollector using the FacetsAccumulator from FacetsAccumulator.create(org.apache.lucene.facet.params.FacetSearchParams, org.apache.lucene.index.IndexReader, org.apache.lucene.facet.taxonomy.TaxonomyReader) . |
protected abstract void |
finish()
Called when the Collector has finished, so that the last FacetsCollector.MatchingDocs can be added. |
List<FacetResult> |
getFacetResults()
Returns a FacetResult per FacetRequest set in
FacetSearchParams . |
List<FacetsCollector.MatchingDocs> |
getMatchingDocs()
Returns the documents matched by the query, one FacetsCollector.MatchingDocs per
visited segment. |
void |
reset()
Allows to reuse the collector between search requests. |
Methods inherited from class org.apache.lucene.search.Collector |
---|
acceptsDocsOutOfOrder, collect, setNextReader, setScorer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final List<FacetsCollector.MatchingDocs> matchingDocs
Constructor Detail |
---|
protected FacetsCollector(FacetsAccumulator accumulator)
Method Detail |
---|
public static FacetsCollector create(FacetSearchParams fsp, IndexReader indexReader, TaxonomyReader taxoReader)
FacetsCollector
using the FacetsAccumulator
from FacetsAccumulator.create(org.apache.lucene.facet.params.FacetSearchParams, org.apache.lucene.index.IndexReader, org.apache.lucene.facet.taxonomy.TaxonomyReader)
.
public static FacetsCollector create(FacetsAccumulator accumulator)
FacetsCollector
that satisfies the requirements of the
given FacetsAccumulator
.
protected abstract void finish()
FacetsCollector.MatchingDocs
can be added.
public final List<FacetResult> getFacetResults() throws IOException
FacetResult
per FacetRequest
set in
FacetSearchParams
. Note that if one of the requests
is for a CategoryPath
that does not exist in the taxonomy,
no matching FacetResult
will be returned.
IOException
public final List<FacetsCollector.MatchingDocs> getMatchingDocs()
FacetsCollector.MatchingDocs
per
visited segment.
public final void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |