org.apache.lucene.facet.search
Interface Aggregator

All Known Implementing Classes:
ComplementCountingAggregator, CountingAggregator, ScoringAggregator

public interface Aggregator

Aggregates the categories of documents given to aggregate(int, float, IntsRef). Note that the document IDs are local to the reader given to setNextReader(AtomicReaderContext).

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

Method Summary
 void aggregate(int docID, float score, IntsRef ordinals)
          Aggregate the ordinals of the given document ID (and its score).
 boolean setNextReader(AtomicReaderContext context)
          Sets the AtomicReaderContext for which aggregate(int, float, IntsRef) calls will be made.
 

Method Detail

setNextReader

boolean setNextReader(AtomicReaderContext context)
                      throws IOException
Sets the AtomicReaderContext for which aggregate(int, float, IntsRef) calls will be made. If this method returns false, aggregate(int, float, IntsRef) should not be called for this reader.

Throws:
IOException

aggregate

void aggregate(int docID,
               float score,
               IntsRef ordinals)
               throws IOException
Aggregate the ordinals of the given document ID (and its score). The given ordinals offset is always zero.

Throws:
IOException


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