org.apache.lucene.facet.range
Class RangeFacetsAccumulatorWrapper

java.lang.Object
  extended by org.apache.lucene.facet.search.FacetsAccumulator
      extended by org.apache.lucene.facet.range.RangeFacetsAccumulatorWrapper

public class RangeFacetsAccumulatorWrapper
extends FacetsAccumulator

Takes multiple facet requests and if necessary splits them between the normal FacetsAccumulator and a RangeAccumulator


Field Summary
 
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
facetArrays, indexReader, searchParams, taxonomyReader
 
Method Summary
 List<FacetResult> accumulate(List<FacetsCollector.MatchingDocs> matchingDocs)
          Used by FacetsCollector to build the list of facet results that match the facet requests that were given in the constructor.
static FacetsAccumulator create(FacetSearchParams fsp, IndexReader indexReader, TaxonomyReader taxoReader)
           
static FacetsAccumulator create(FacetSearchParams fsp, IndexReader indexReader, TaxonomyReader taxoReader, FacetArrays arrays)
           
protected  FacetResultsHandler createFacetResultsHandler(FacetRequest fr)
          Creates a FacetResultsHandler that matches the given FacetRequest.
 FacetsAggregator getAggregator()
          Returns the FacetsAggregator to use for aggregating the categories found in the result documents.
protected  Set<CategoryListParams> getCategoryLists()
           
 boolean requiresDocScores()
           
 
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
emptyResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static FacetsAccumulator create(FacetSearchParams fsp,
                                       IndexReader indexReader,
                                       TaxonomyReader taxoReader)

create

public static FacetsAccumulator create(FacetSearchParams fsp,
                                       IndexReader indexReader,
                                       TaxonomyReader taxoReader,
                                       FacetArrays arrays)

getAggregator

public FacetsAggregator getAggregator()
Description copied from class: FacetsAccumulator
Returns the FacetsAggregator to use for aggregating the categories found in the result documents. The default implementation returns CountingFacetsAggregator, or FastCountingFacetsAggregator if all categories can be decoded with DGapVInt8IntDecoder.

Overrides:
getAggregator in class FacetsAccumulator

createFacetResultsHandler

protected FacetResultsHandler createFacetResultsHandler(FacetRequest fr)
Description copied from class: FacetsAccumulator
Creates a FacetResultsHandler that matches the given FacetRequest.

Overrides:
createFacetResultsHandler in class FacetsAccumulator

getCategoryLists

protected Set<CategoryListParams> getCategoryLists()
Overrides:
getCategoryLists in class FacetsAccumulator

requiresDocScores

public boolean requiresDocScores()
Overrides:
requiresDocScores in class FacetsAccumulator

accumulate

public List<FacetResult> accumulate(List<FacetsCollector.MatchingDocs> matchingDocs)
                             throws IOException
Description copied from class: FacetsAccumulator
Used by FacetsCollector to build the list of facet results that match the facet requests that were given in the constructor.

Overrides:
accumulate in class FacetsAccumulator
Parameters:
matchingDocs - the documents that matched the query, per-segment.
Throws:
IOException


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