org.apache.lucene.facet.search
Interface FacetsAggregator

All Known Implementing Classes:
CachedOrdsCountingFacetsAggregator, CountingFacetsAggregator, FastCountingFacetsAggregator, IntRollupFacetsAggregator, MultiAssociationsFacetsAggregator, PerCategoryListAggregator, SumFloatAssociationFacetsAggregator, SumIntAssociationFacetsAggregator, SumScoreFacetsAggregator

public interface FacetsAggregator

Aggregates categories that were found in result documents (specified by FacetsCollector.MatchingDocs). If the aggregator requires document scores too, it should return true from requiresDocScores().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void aggregate(FacetsCollector.MatchingDocs matchingDocs, CategoryListParams clp, FacetArrays facetArrays)
          Aggregate the facets found in the given matching documents.
 boolean requiresDocScores()
          Returns true if this aggregator requires document scores.
 void rollupValues(FacetRequest fr, int ordinal, int[] children, int[] siblings, FacetArrays facetArrays)
          Rollup the values of the given ordinal.
 

Method Detail

aggregate

void aggregate(FacetsCollector.MatchingDocs matchingDocs,
               CategoryListParams clp,
               FacetArrays facetArrays)
               throws IOException
Aggregate the facets found in the given matching documents.

Throws:
IOException

rollupValues

void rollupValues(FacetRequest fr,
                  int ordinal,
                  int[] children,
                  int[] siblings,
                  FacetArrays facetArrays)
Rollup the values of the given ordinal. This method is called when a category was indexed with CategoryListParams.OrdinalPolicy.NO_PARENTS. The given ordinal is the requested category, and you should use the children and siblings arrays to traverse its sub-tree.


requiresDocScores

boolean requiresDocScores()
Returns true if this aggregator requires document scores.



Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.