Module org.apache.lucene.facet
Class ConcurrentSortedSetDocValuesFacetCounts
java.lang.Object
org.apache.lucene.facet.Facets
org.apache.lucene.facet.sortedset.AbstractSortedSetDocValueFacetCounts
org.apache.lucene.facet.sortedset.ConcurrentSortedSetDocValuesFacetCounts
Like
SortedSetDocValuesFacetCounts
, but aggregates counts concurrently across segments.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Nested classes/interfaces inherited from class org.apache.lucene.facet.sortedset.AbstractSortedSetDocValueFacetCounts
AbstractSortedSetDocValueFacetCounts.ChildIterationCursor, AbstractSortedSetDocValueFacetCounts.DimValue
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicIntegerArray
(package private) final ExecutorService
Fields inherited from class org.apache.lucene.facet.sortedset.AbstractSortedSetDocValueFacetCounts
dv, field, state, stateConfig
-
Constructor Summary
ConstructorsConstructorDescriptionReturns all facet counts, same result as searching onMatchAllDocsQuery
but faster.ConcurrentSortedSetDocValuesFacetCounts
(SortedSetDocValuesReaderState state, FacetsCollector hits, ExecutorService exec) Counts all facet dimensions across the provided hits. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
count
(List<FacetsCollector.MatchingDocs> matchingDocs) Does all the "real work" of tallying up the counts.private void
countAll()
Does all the "real work" of tallying up the counts.(package private) int
getCount
(int ord) Retrieve the count for a specified ordinal.(package private) boolean
Were any counts actually computed? (They may not be if there are no hits, etc.)Methods inherited from class org.apache.lucene.facet.sortedset.AbstractSortedSetDocValueFacetCounts
getAllChildren, getAllDims, getSpecificValue, getTopChildren, getTopDims
Methods inherited from class org.apache.lucene.facet.Facets
validateTopN
-
Field Details
-
exec
-
counts
-
-
Constructor Details
-
ConcurrentSortedSetDocValuesFacetCounts
public ConcurrentSortedSetDocValuesFacetCounts(SortedSetDocValuesReaderState state, ExecutorService exec) throws IOException, InterruptedException Returns all facet counts, same result as searching onMatchAllDocsQuery
but faster.- Throws:
IOException
InterruptedException
-
ConcurrentSortedSetDocValuesFacetCounts
public ConcurrentSortedSetDocValuesFacetCounts(SortedSetDocValuesReaderState state, FacetsCollector hits, ExecutorService exec) throws IOException, InterruptedException Counts all facet dimensions across the provided hits.- Throws:
IOException
InterruptedException
-
-
Method Details
-
hasCounts
boolean hasCounts()Description copied from class:AbstractSortedSetDocValueFacetCounts
Were any counts actually computed? (They may not be if there are no hits, etc.)- Specified by:
hasCounts
in classAbstractSortedSetDocValueFacetCounts
-
getCount
int getCount(int ord) Description copied from class:AbstractSortedSetDocValueFacetCounts
Retrieve the count for a specified ordinal.- Specified by:
getCount
in classAbstractSortedSetDocValueFacetCounts
-
count
private void count(List<FacetsCollector.MatchingDocs> matchingDocs) throws IOException, InterruptedException Does all the "real work" of tallying up the counts.- Throws:
IOException
InterruptedException
-
countAll
Does all the "real work" of tallying up the counts.- Throws:
IOException
InterruptedException
-