Package org.apache.lucene.facet.taxonomy
Class IntTaxonomyFacets
java.lang.Object
org.apache.lucene.facet.Facets
org.apache.lucene.facet.taxonomy.TaxonomyFacets
org.apache.lucene.facet.taxonomy.IntTaxonomyFacets
- Direct Known Subclasses:
TaxonomyFacetCounts,TaxonomyFacetIntAssociations
Deprecated.
Base class for all taxonomy-based facets that aggregate to a per-ords int[].
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDeprecated.An accumulator for an integer aggregated value.Nested classes/interfaces inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
TaxonomyFacets.AggregatedValue -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AssociationAggregationFunctionDeprecated.Aggregation function used for combining values.protected IntIntHashMapDeprecated.Sparse ordinal values.protected int[]Deprecated.Dense ordinal values.Fields inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
config, indexFieldName, taxoReader, valueComparator -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) Deprecated.Constructor that defaults the aggregation function toAssociationAggregationFunction.SUM.protectedIntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, AssociationAggregationFunction aggregationFunction, FacetsCollector fc) Deprecated.Constructor that uses the provided aggregation function. -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberDeprecated.Apply an aggregation to the two values and return the result.protected NumbergetAggregationValue(int ordinal) Deprecated.Get the aggregation value for this ordinal.protected voidincrement(int ordinal) Deprecated.Increment the count for this ordinal by 1.protected voidincrement(int ordinal, int amount) Deprecated.Increment the count for this ordinal byamount..protected voidDeprecated.If not done already, initialize the data structures storing counts.protected TaxonomyFacets.AggregatedValueDeprecated.Initialize an accumulator.protected voidsetIncomingValue(TopOrdAndNumberQueue.OrdAndValue incomingOrdAndValue, int ord) Deprecated.Set the value for aTopOrdAndNumberQueue.OrdAndValueto the one corresponding to the given ordinal.protected voidupdateValueFromRollup(int ordinal, int childOrdinal) Deprecated.Roll-up the aggregation values fromchildOrdinaltoordinal.Methods inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
childrenLoaded, getAllChildren, getAllDims, getCount, getSpecificValue, getTopChildren, getTopChildrenForPath, getTopDims, insertIntoQueue, makeTopOrdAndNumberQueue, missingAggregationValue, rollup, setCount, siblingsLoaded, useHashTable, verifyDimMethods inherited from class org.apache.lucene.facet.Facets
validateTopN
-
Field Details
-
aggregationFunction
Deprecated.Aggregation function used for combining values. -
values
protected int[] valuesDeprecated.Dense ordinal values.We are making this and
sparseValuesprotected for some expert usage. e.g. It can be checked which is being used before a loop instead of callingincrement(int)for each iteration. -
sparseValues
Deprecated.Sparse ordinal values.- See Also:
-
-
Constructor Details
-
IntTaxonomyFacets
protected IntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) throws IOException Deprecated.Constructor that defaults the aggregation function toAssociationAggregationFunction.SUM.- Throws:
IOException
-
IntTaxonomyFacets
protected IntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, AssociationAggregationFunction aggregationFunction, FacetsCollector fc) throws IOException Deprecated.Constructor that uses the provided aggregation function.- Throws:
IOException
-
-
Method Details
-
initializeValueCounters
protected void initializeValueCounters()Deprecated.Description copied from class:TaxonomyFacetsIf not done already, initialize the data structures storing counts.- Overrides:
initializeValueCountersin classTaxonomyFacets
-
increment
protected void increment(int ordinal) Deprecated.Increment the count for this ordinal by 1. -
increment
protected void increment(int ordinal, int amount) Deprecated.Increment the count for this ordinal byamount.. -
getAggregationValue
Deprecated.Description copied from class:TaxonomyFacetsGet the aggregation value for this ordinal.- Overrides:
getAggregationValuein classTaxonomyFacets
-
aggregate
Deprecated.Description copied from class:TaxonomyFacetsApply an aggregation to the two values and return the result.- Overrides:
aggregatein classTaxonomyFacets
-
updateValueFromRollup
Deprecated.Description copied from class:TaxonomyFacetsRoll-up the aggregation values fromchildOrdinaltoordinal. Overrides should probably call this to update the counts. Overriding allows us to work with primitive types for the aggregation values, keeping aggregation efficient.- Overrides:
updateValueFromRollupin classTaxonomyFacets- Throws:
IOException
-
setIncomingValue
Deprecated.Description copied from class:TaxonomyFacetsSet the value for aTopOrdAndNumberQueue.OrdAndValueto the one corresponding to the given ordinal.- Overrides:
setIncomingValuein classTaxonomyFacets
-
newAggregatedValue
Deprecated.Description copied from class:TaxonomyFacetsInitialize an accumulator.- Overrides:
newAggregatedValuein classTaxonomyFacets
-
FastTaxonomyFacetCountsandTaxonomyFacetIntAssociations,and is not intended as an extension point for user-createdFacetsimplementations. If your code is relying on this, please migrate necessary functionality down into your own class.