org.apache.lucene.facet.search
Class IntRollupFacetsAggregator

java.lang.Object
  extended by org.apache.lucene.facet.search.IntRollupFacetsAggregator
All Implemented Interfaces:
FacetsAggregator
Direct Known Subclasses:
CachedOrdsCountingFacetsAggregator, CountingFacetsAggregator, FastCountingFacetsAggregator

public abstract class IntRollupFacetsAggregator
extends Object
implements FacetsAggregator

A FacetsAggregator which implements rollupValues(FacetRequest, int, int[], int[], FacetArrays) by summing the values from FacetArrays.getIntArray(). Extending classes should only implement aggregate(org.apache.lucene.facet.search.FacetsCollector.MatchingDocs, org.apache.lucene.facet.params.CategoryListParams, org.apache.lucene.facet.search.FacetArrays). Also, requiresDocScores() always returns false.

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

Constructor Summary
IntRollupFacetsAggregator()
           
 
Method Summary
abstract  void aggregate(FacetsCollector.MatchingDocs matchingDocs, CategoryListParams clp, FacetArrays facetArrays)
          Aggregate the facets found in the given matching documents.
 OrdinalValueResolver createOrdinalValueResolver(FacetRequest facetRequest, FacetArrays arrays)
          Creates the appropriate OrdinalValueResolver for this aggregator and the given FacetRequest.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntRollupFacetsAggregator

public IntRollupFacetsAggregator()
Method Detail

aggregate

public abstract void aggregate(FacetsCollector.MatchingDocs matchingDocs,
                               CategoryListParams clp,
                               FacetArrays facetArrays)
                        throws IOException
Description copied from interface: FacetsAggregator
Aggregate the facets found in the given matching documents.

Specified by:
aggregate in interface FacetsAggregator
Throws:
IOException

rollupValues

public final void rollupValues(FacetRequest fr,
                               int ordinal,
                               int[] children,
                               int[] siblings,
                               FacetArrays facetArrays)
Description copied from interface: FacetsAggregator
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.

Specified by:
rollupValues in interface FacetsAggregator

requiresDocScores

public final boolean requiresDocScores()
Description copied from interface: FacetsAggregator
Returns true if this aggregator requires document scores.

Specified by:
requiresDocScores in interface FacetsAggregator

createOrdinalValueResolver

public OrdinalValueResolver createOrdinalValueResolver(FacetRequest facetRequest,
                                                       FacetArrays arrays)
Description copied from interface: FacetsAggregator
Creates the appropriate OrdinalValueResolver for this aggregator and the given FacetRequest. The request is passed so that compound aggregators can return the correct OrdinalValueResolver.

Specified by:
createOrdinalValueResolver in interface FacetsAggregator


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