Class AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
- java.lang.Object
-
- org.apache.lucene.search.Collector
-
- org.apache.lucene.search.grouping.AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
-
- Direct Known Subclasses:
TermAllGroupsCollector
public abstract class AbstractAllGroupsCollector<GROUP_VALUE_TYPE> extends org.apache.lucene.search.CollectorA collector that collects all groups that match the query. Only the group value is collected, and the order is undefined. This collector does not determine the most relevant document of a group. This is an abstract version. Concrete implementations define what a group actually is and how it is internally collected.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description AbstractAllGroupsCollector()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanacceptsDocsOutOfOrder()intgetGroupCount()Returns the total number of groups for the executed search.abstract Collection<GROUP_VALUE_TYPE>getGroups()Returns the group valuesvoidsetScorer(org.apache.lucene.search.Scorer scorer)
-
-
-
Method Detail
-
getGroupCount
public int getGroupCount()
Returns the total number of groups for the executed search. This is a convenience method. The following code snippet has the same effect:getGroups().size()
- Returns:
- The total number of groups for the executed search
-
getGroups
public abstract Collection<GROUP_VALUE_TYPE> getGroups()
Returns the group values This is an unordered collections of group values. For each group that matched the query there is aBytesRefrepresenting a group value.- Returns:
- the group values
-
setScorer
public void setScorer(org.apache.lucene.search.Scorer scorer) throws IOException- Specified by:
setScorerin classorg.apache.lucene.search.Collector- Throws:
IOException
-
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrderin classorg.apache.lucene.search.Collector
-
-