Class ValueSourceGroupSelector
java.lang.Object
org.apache.lucene.search.grouping.GroupSelector<org.apache.lucene.util.mutable.MutableValue>
org.apache.lucene.search.grouping.ValueSourceGroupSelector
public class ValueSourceGroupSelector
extends GroupSelector<org.apache.lucene.util.mutable.MutableValue>
A GroupSelector that groups via a ValueSource
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.GroupSelector
GroupSelector.State -
Constructor Summary
ConstructorsConstructorDescriptionValueSourceGroupSelector(org.apache.lucene.queries.function.ValueSource valueSource, Map<Object, Object> context) Create a new ValueSourceGroupSelector -
Method Summary
Modifier and TypeMethodDescriptionadvanceTo(int doc) Advance the GroupSelector's iterator to the given documentorg.apache.lucene.util.mutable.MutableValueorg.apache.lucene.util.mutable.MutableValueGet the group value of the current documentvoidsetGroups(Collection<SearchGroup<org.apache.lucene.util.mutable.MutableValue>> searchGroups) Set a restriction on the group values returned by this selectorvoidsetNextReader(org.apache.lucene.index.LeafReaderContext readerContext) Set the LeafReaderContextvoidsetScorer(org.apache.lucene.search.Scorable scorer) Set the current Scorer
-
Constructor Details
-
Method Details
-
setNextReader
public void setNextReader(org.apache.lucene.index.LeafReaderContext readerContext) throws IOException Description copied from class:GroupSelectorSet the LeafReaderContext- Specified by:
setNextReaderin classGroupSelector<org.apache.lucene.util.mutable.MutableValue>- Throws:
IOException
-
setScorer
Description copied from class:GroupSelectorSet the current Scorer- Specified by:
setScorerin classGroupSelector<org.apache.lucene.util.mutable.MutableValue>- Throws:
IOException
-
advanceTo
Description copied from class:GroupSelectorAdvance the GroupSelector's iterator to the given document- Specified by:
advanceToin classGroupSelector<org.apache.lucene.util.mutable.MutableValue>- 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<org.apache.lucene.util.mutable.MutableValue>- Throws:
IOException
-
copyValue
public org.apache.lucene.util.mutable.MutableValue copyValue()- Specified by:
copyValuein classGroupSelector<org.apache.lucene.util.mutable.MutableValue>- Returns:
- a copy of the group value of the current document
-
setGroups
public void setGroups(Collection<SearchGroup<org.apache.lucene.util.mutable.MutableValue>> searchGroups) 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<org.apache.lucene.util.mutable.MutableValue>- Parameters:
searchGroups- a set ofSearchGroupobjects to limit selections to
-