Module org.apache.lucene.facet
Package org.apache.lucene.facet.taxonomy
Class TaxonomyFacetFloatAssociations
java.lang.Object
org.apache.lucene.facet.Facets
org.apache.lucene.facet.taxonomy.TaxonomyFacets
org.apache.lucene.facet.taxonomy.FloatTaxonomyFacets
org.apache.lucene.facet.taxonomy.TaxonomyFacetFloatAssociations
Aggregates float values associated with facet fields. Supports two different approaches:
- Fields can be indexed with
FloatAssociationFacetField
, associating weights with facet values at indexing time. - Fields can be indexed with
FacetField
and aDoubleValuesSource
can dynamically supply a weight from each doc. With this approach, the document's weight gets contributed to each facet value associated with the doc.
FloatAssociationFacetField
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.taxonomy.FloatTaxonomyFacets
FloatTaxonomyFacets.FloatAggregatedValue
Nested classes/interfaces inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
TaxonomyFacets.AggregatedValue, TaxonomyFacets.TopChildrenForPath
-
Field Summary
Fields inherited from class org.apache.lucene.facet.taxonomy.FloatTaxonomyFacets
aggregationFunction, sparseValues, values
Fields inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
config, counts, fc, indexFieldName, initialized, parents, sparseCounts, taxoReader, valueComparator
-
Constructor Summary
ConstructorsConstructorDescriptionTaxonomyFacetFloatAssociations
(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction) CreateTaxonomyFacetFloatAssociations
against the specified index field.TaxonomyFacetFloatAssociations
(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction, DoubleValuesSource valuesSource) CreateTaxonomyFacetFloatAssociations
against the specified index field.TaxonomyFacetFloatAssociations
(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction) CreateTaxonomyFacetFloatAssociations
against the default index field.TaxonomyFacetFloatAssociations
(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction, DoubleValuesSource valuesSource) CreateTaxonomyFacetFloatAssociations
against the default index field. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
aggregateValues
(AssociationAggregationFunction aggregationFunction, List<FacetsCollector.MatchingDocs> matchingDocs) Aggregate from indexed association values.private void
aggregateValues
(AssociationAggregationFunction aggregationFunction, List<FacetsCollector.MatchingDocs> matchingDocs, boolean keepScores, DoubleValuesSource valueSource) Aggregate using the providedDoubleValuesSource
.private static DoubleValues
Methods inherited from class org.apache.lucene.facet.taxonomy.FloatTaxonomyFacets
aggregate, getAggregationValue, getValue, initializeValueCounters, makeTopOrdAndNumberQueue, missingAggregationValue, newAggregatedValue, setIncomingValue, setValue, updateValueFromRollup
Methods inherited from class org.apache.lucene.facet.taxonomy.TaxonomyFacets
childrenLoaded, getAllChildren, getAllDims, getChildren, getCount, getSiblings, getSpecificValue, getTopChildren, getTopChildrenForPath, getTopDims, hasValues, insertIntoQueue, rollup, setCount, siblingsLoaded, verifyDim
Methods inherited from class org.apache.lucene.facet.Facets
validateTopN
-
Constructor Details
-
TaxonomyFacetFloatAssociations
public TaxonomyFacetFloatAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction) throws IOException CreateTaxonomyFacetFloatAssociations
against the default index field.- Throws:
IOException
-
TaxonomyFacetFloatAssociations
public TaxonomyFacetFloatAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction, DoubleValuesSource valuesSource) throws IOException CreateTaxonomyFacetFloatAssociations
against the default index field. Sources values from the providedvaluesSource
.- Throws:
IOException
-
TaxonomyFacetFloatAssociations
public TaxonomyFacetFloatAssociations(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction) throws IOException CreateTaxonomyFacetFloatAssociations
against the specified index field.- Throws:
IOException
-
TaxonomyFacetFloatAssociations
public TaxonomyFacetFloatAssociations(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, AssociationAggregationFunction aggregationFunction, DoubleValuesSource valuesSource) throws IOException CreateTaxonomyFacetFloatAssociations
against the specified index field. Sources values from the providedvaluesSource
.- Throws:
IOException
-
-
Method Details
-
scores
-
aggregateValues
private void aggregateValues(AssociationAggregationFunction aggregationFunction, List<FacetsCollector.MatchingDocs> matchingDocs, boolean keepScores, DoubleValuesSource valueSource) throws IOException Aggregate using the providedDoubleValuesSource
.- Throws:
IOException
-
aggregateValues
private void aggregateValues(AssociationAggregationFunction aggregationFunction, List<FacetsCollector.MatchingDocs> matchingDocs) throws IOException Aggregate from indexed association values.- Throws:
IOException
-