Class TermGroupSelector
java.lang.Object
org.apache.lucene.search.grouping.GroupSelector<BytesRef>
org.apache.lucene.search.grouping.TermGroupSelector
A GroupSelector implementation that groups via SortedDocValues
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.GroupSelector
GroupSelector.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvanceTo(int doc) Advance the GroupSelector's iterator to the given documentGet the group value of the current documentvoidsetGroups(Collection<SearchGroup<BytesRef>> searchGroups) Set a restriction on the group values returned by this selectorvoidsetNextReader(LeafReaderContext readerContext) Set the LeafReaderContextvoidSet the current Scorer
-
Constructor Details
-
TermGroupSelector
Create a new TermGroupSelector- Parameters:
field- the SortedDocValues field to use for grouping
-
-
Method Details
-
setNextReader
Description copied from class:GroupSelectorSet the LeafReaderContext- Specified by:
setNextReaderin classGroupSelector<BytesRef>- Throws:
IOException
-
setScorer
Description copied from class:GroupSelectorSet the current Scorer- Specified by:
setScorerin classGroupSelector<BytesRef>- Throws:
IOException
-
advanceTo
Description copied from class:GroupSelectorAdvance the GroupSelector's iterator to the given document- Specified by:
advanceToin classGroupSelector<BytesRef>- Throws:
IOException
-
currentValue
Description copied from class:GroupSelectorGet the group value of the current documentN.B. this object may be reused, for a persistent version use
GroupSelector.copyValue()- Specified by:
currentValuein classGroupSelector<BytesRef>
-
copyValue
- Specified by:
copyValuein classGroupSelector<BytesRef>- Returns:
- a copy of the group value of the current document
-
setGroups
Description copied from class:GroupSelectorSet a restriction on the group values returned by this selectorIf the selector is positioned on a document whose group value is not contained within this set, then
GroupSelector.advanceTo(int)will returnGroupSelector.State.SKIP- Specified by:
setGroupsin classGroupSelector<BytesRef>- Parameters:
searchGroups- a set ofSearchGroupobjects to limit selections to
-