Class ValueSourceGroupSelector
java.lang.Object
org.apache.lucene.search.grouping.GroupSelector<MutableValue>
org.apache.lucene.search.grouping.ValueSourceGroupSelector
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
ConstructorDescriptionValueSourceGroupSelector
(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 documentGet the group value of the current documentvoid
setGroups
(Collection<SearchGroup<MutableValue>> searchGroups) Set a restriction on the group values returned by this selectorvoid
setNextReader
(LeafReaderContext readerContext) Set the LeafReaderContextvoid
Set the current Scorer
-
Constructor Details
-
ValueSourceGroupSelector
Create a new ValueSourceGroupSelector- Parameters:
valueSource
- the ValueSource to group bycontext
- a context map for the ValueSource
-
-
Method Details
-
setNextReader
Description copied from class:GroupSelector
Set the LeafReaderContext- Specified by:
setNextReader
in classGroupSelector<MutableValue>
- Throws:
IOException
-
setScorer
Description copied from class:GroupSelector
Set the current Scorer- Specified by:
setScorer
in classGroupSelector<MutableValue>
- Throws:
IOException
-
advanceTo
Description copied from class:GroupSelector
Advance the GroupSelector's iterator to the given document- Specified by:
advanceTo
in classGroupSelector<MutableValue>
- Throws:
IOException
-
currentValue
Description copied from class:GroupSelector
Get the group value of the current documentN.B. this object may be reused, for a persistent version use
GroupSelector.copyValue()
- Specified by:
currentValue
in classGroupSelector<MutableValue>
- Throws:
IOException
-
copyValue
- Specified by:
copyValue
in classGroupSelector<MutableValue>
- Returns:
- a copy of the group value of the current document
-
setGroups
Description copied from class:GroupSelector
Set 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:
setGroups
in classGroupSelector<MutableValue>
- Parameters:
searchGroups
- a set ofSearchGroup
objects to limit selections to
-