org.apache.lucene.search.grouping.function
Class FunctionSecondPassGroupingCollector
java.lang.Object
org.apache.lucene.search.Collector
org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<MutableValue>
org.apache.lucene.search.grouping.function.FunctionSecondPassGroupingCollector
public class FunctionSecondPassGroupingCollector
- extends AbstractSecondPassGroupingCollector<MutableValue>
Concrete implementation of AbstractSecondPassGroupingCollector that groups based on
ValueSource instances.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FunctionSecondPassGroupingCollector
public FunctionSecondPassGroupingCollector(Collection<SearchGroup<MutableValue>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields,
ValueSource groupByVS,
Map<?,?> vsContext)
throws IOException
- Constructs a
FunctionSecondPassGroupingCollector instance.
- Parameters:
searchGroups - The SearchGroup instances collected during the first phase.groupSort - The group sortwithinGroupSort - The sort inside a groupmaxDocsPerGroup - The maximum number of documents to collect inside a groupgetScores - Whether to include the scoresgetMaxScores - Whether to include the maximum scorefillSortFields - Whether to fill the sort values in TopGroups.withinGroupSortgroupByVS - The ValueSource to group byvsContext - The value source context
- Throws:
IOException - IOException When I/O related errors occur
retrieveGroup
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<MutableValue> retrieveGroup(int doc)
throws IOException
- Returns the group the specified doc belongs to or
null if no group could be retrieved.
- Specified by:
retrieveGroup in class AbstractSecondPassGroupingCollector<MutableValue>
- Parameters:
doc - The specified doc
- Returns:
- the group the specified doc belongs to or
null if no group could be retrieved
- Throws:
IOException - If an I/O related error occurred
setNextReader
public void setNextReader(AtomicReaderContext readerContext)
throws IOException
-
- Overrides:
setNextReader in class AbstractSecondPassGroupingCollector<MutableValue>
- Throws:
IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.