public abstract class AbstractDistinctValuesCollector<GC extends AbstractDistinctValuesCollector.GroupCount<?>> extends Collector
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDistinctValuesCollector.GroupCount<GROUP_VALUE_TYPE>
Returned by
getGroups() ,
representing the value and set of distinct values for the group. |
Constructor and Description |
---|
AbstractDistinctValuesCollector() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsDocsOutOfOrder()
Return
true if this collector does not
require the matching docIDs to be delivered in int sort
order (smallest to largest) to Collector.collect(int) . |
abstract List<GC> |
getGroups()
Returns all unique values for each top N group.
|
void |
setScorer(Scorer scorer)
Called before successive calls to
Collector.collect(int) . |
collect, setNextReader
public abstract List<GC> getGroups()
public boolean acceptsDocsOutOfOrder()
Collector
true
if this collector does not
require the matching docIDs to be delivered in int sort
order (smallest to largest) to Collector.collect(int)
.
Most Lucene Query implementations will visit
matching docIDs in order. However, some queries
(currently limited to certain cases of BooleanQuery
) can achieve faster searching if the
Collector
allows them to deliver the
docIDs out of order.
Many collectors don't mind getting docIDs out of
order, so it's important to return true
here.
acceptsDocsOutOfOrder
in class Collector
public void setScorer(Scorer scorer) throws IOException
Collector
Collector.collect(int)
. Implementations
that need the score of the current document (passed-in to
Collector.collect(int)
), should save the passed-in Scorer and call
scorer.score() when needed.setScorer
in class Collector
IOException
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.