|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.FacetsAccumulator
public abstract class FacetsAccumulator
Accumulates the facets defined in the FacetSearchParams
.
Field Summary | |
---|---|
FacetSearchParams |
searchParams
|
Constructor Summary | |
---|---|
protected |
FacetsAccumulator(FacetSearchParams fsp)
Constructor with the given search params. |
Method Summary | |
---|---|
abstract List<FacetResult> |
accumulate(List<FacetsCollector.MatchingDocs> matchingDocs)
Used by FacetsCollector to build the list of facet results that match the facet requests that were
given in the constructor. |
static FacetsAccumulator |
create(FacetSearchParams fsp,
IndexReader indexReader,
TaxonomyReader taxoReader,
FacetArrays arrays)
Creates a FacetsAccumulator for the given facet requests. |
static FacetsAccumulator |
create(FacetSearchParams fsp,
SortedSetDocValuesReaderState state,
FacetArrays arrays)
Creates a FacetsAccumulator for the given facet requests. |
protected static FacetResult |
emptyResult(int ordinal,
FacetRequest fr)
Returns an empty FacetResult . |
abstract boolean |
requiresDocScores()
Used by FacetsCollector to determine if document scores need to be
collected in addition to matching documents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public FacetSearchParams searchParams
Constructor Detail |
---|
protected FacetsAccumulator(FacetSearchParams fsp)
Method Detail |
---|
public static FacetsAccumulator create(FacetSearchParams fsp, IndexReader indexReader, TaxonomyReader taxoReader, FacetArrays arrays)
FacetsAccumulator
for the given facet requests. This
method supports RangeAccumulator
and
TaxonomyFacetsAccumulator
by dividing the facet requests into
RangeFacetRequest
and the rest.
If both types of facet requests are used, it returns a
MultiFacetsAccumulator
and the facet results returned from
accumulate(List)
may not be in the same order as the given facet
requests.
fsp
- the search params define the facet requests and the
FacetIndexingParams
indexReader
- the IndexReader
used for searchtaxoReader
- the TaxonomyReader
used for searcharrays
- the FacetArrays
which the accumulator should use to store
the categories weights in. Can be null
.public static FacetsAccumulator create(FacetSearchParams fsp, SortedSetDocValuesReaderState state, FacetArrays arrays) throws IOException
FacetsAccumulator
for the given facet requests. This
method supports RangeAccumulator
and
SortedSetDocValuesAccumulator
by dividing the facet requests into
RangeFacetRequest
and the rest.
If both types of facet requests are used, it returns a
MultiFacetsAccumulator
and the facet results returned from
accumulate(List)
may not be in the same order as the given facet
requests.
fsp
- the search params define the facet requests and the
FacetIndexingParams
state
- the SortedSetDocValuesReaderState
needed for accumulating
the categoriesarrays
- the FacetArrays
which the accumulator should use to
store the categories weights in. Can be null
.
IOException
protected static FacetResult emptyResult(int ordinal, FacetRequest fr)
FacetResult
.
public abstract List<FacetResult> accumulate(List<FacetsCollector.MatchingDocs> matchingDocs) throws IOException
FacetsCollector
to build the list of facet results
that match the facet requests
that were
given in the constructor.
matchingDocs
- the documents that matched the query, per-segment.
IOException
public abstract boolean requiresDocScores()
FacetsCollector
to determine if document scores need to be
collected in addition to matching documents.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |