Class LongRangeGroupSelector
java.lang.Object
org.apache.lucene.search.grouping.GroupSelector<LongRange>
org.apache.lucene.search.grouping.LongRangeGroupSelector
A GroupSelector implementation that groups documents by long values
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.GroupSelector
GroupSelector.State -
Constructor Summary
ConstructorsConstructorDescriptionLongRangeGroupSelector(LongValuesSource source, LongRangeFactory rangeFactory) Creates a new LongRangeGroupSelector -
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<LongRange>> searchGroups) Set a restriction on the group values returned by this selectorvoidsetNextReader(LeafReaderContext readerContext) Set the LeafReaderContextvoidSet the current Scorer
-
Constructor Details
-
LongRangeGroupSelector
Creates a new LongRangeGroupSelector- Parameters:
source- a LongValuesSource to retrieve long values per documentrangeFactory- a LongRangeFactory that defines how to group the long values into range buckets
-
-
Method Details
-
setNextReader
Description copied from class:GroupSelectorSet the LeafReaderContext- Specified by:
setNextReaderin classGroupSelector<LongRange>- Throws:
IOException
-
setScorer
Description copied from class:GroupSelectorSet the current Scorer- Specified by:
setScorerin classGroupSelector<LongRange>- Throws:
IOException
-
advanceTo
Description copied from class:GroupSelectorAdvance the GroupSelector's iterator to the given document- Specified by:
advanceToin classGroupSelector<LongRange>- 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<LongRange>- Throws:
IOException
-
copyValue
- Specified by:
copyValuein classGroupSelector<LongRange>- Returns:
- a copy of the group value of the current document
- Throws:
IOException
-
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<LongRange>- Parameters:
searchGroups- a set ofSearchGroupobjects to limit selections to
-