public class TermGroupSelector extends GroupSelector<BytesRef>
GroupSelector.State| Modifier and Type | Field and Description |
|---|---|
private SortedDocValues |
docValues |
private java.lang.String |
field |
private int |
groupId |
private boolean |
includeEmpty |
private java.util.Map<java.lang.Integer,java.lang.Integer> |
ordsToGroupIds |
private BytesRef |
scratch |
private boolean |
secondPass |
private BytesRefHash |
values |
| Constructor and Description |
|---|
TermGroupSelector(java.lang.String field)
Create a new TermGroupSelector
|
| Modifier and Type | Method and Description |
|---|---|
GroupSelector.State |
advanceTo(int doc)
Advance the GroupSelector's iterator to the given document
|
BytesRef |
copyValue() |
BytesRef |
currentValue()
Get the group value of the current document
N.B.
|
void |
setGroups(java.util.Collection<SearchGroup<BytesRef>> searchGroups)
Set a restriction on the group values returned by this selector
If the selector is positioned on a document whose group value is not contained
within this set, then
GroupSelector.advanceTo(int) will return GroupSelector.State.SKIP |
void |
setNextReader(LeafReaderContext readerContext)
Set the LeafReaderContext
|
private final java.lang.String field
private final BytesRefHash values
private final java.util.Map<java.lang.Integer,java.lang.Integer> ordsToGroupIds
private SortedDocValues docValues
private int groupId
private boolean secondPass
private boolean includeEmpty
private BytesRef scratch
public TermGroupSelector(java.lang.String field)
field - the SortedDocValues field to use for groupingpublic void setNextReader(LeafReaderContext readerContext) throws java.io.IOException
GroupSelectorsetNextReader in class GroupSelector<BytesRef>java.io.IOExceptionpublic GroupSelector.State advanceTo(int doc) throws java.io.IOException
GroupSelectoradvanceTo in class GroupSelector<BytesRef>java.io.IOExceptionpublic BytesRef currentValue()
GroupSelectorGroupSelector.copyValue()currentValue in class GroupSelector<BytesRef>public BytesRef copyValue()
copyValue in class GroupSelector<BytesRef>public void setGroups(java.util.Collection<SearchGroup<BytesRef>> searchGroups)
GroupSelectorGroupSelector.advanceTo(int) will return GroupSelector.State.SKIPsetGroups in class GroupSelector<BytesRef>searchGroups - a set of SearchGroup objects to limit selections to