Package org.apache.lucene.search.grouping

# Class DoubleRangeGroupSelector

java.lang.Object
org.apache.lucene.search.grouping.GroupSelector<DoubleRange>
org.apache.lucene.search.grouping.DoubleRangeGroupSelector

public class DoubleRangeGroupSelector extends GroupSelector<DoubleRange>
A GroupSelector implementation that groups documents by double values

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.GroupSelector

`GroupSelector.State`

## Constructor Summary

Constructors
Constructor
Description
`DoubleRangeGroupSelector(DoubleValuesSource source, DoubleRangeFactory rangeFactory)`
Creates a new DoubleRangeGroupSelector

## Method Summary

Modifier and Type
Method
Description
`GroupSelector.State`
`advanceTo(int doc)`
Advance the GroupSelector's iterator to the given document
`DoubleRange`
`copyValue()`
`DoubleRange`
`currentValue()`
Get the group value of the current document
`void`
`setGroups(Collection<SearchGroup<DoubleRange>> searchGroups)`
Set a restriction on the group values returned by this selector
`void`
`setNextReader(LeafReaderContext readerContext)`
Set the LeafReaderContext
`void`
`setScorer(Scorable scorer)`
Set the current Scorer

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DoubleRangeGroupSelector

public DoubleRangeGroupSelector(DoubleValuesSource source, DoubleRangeFactory rangeFactory)
Creates a new DoubleRangeGroupSelector

Parameters:
  `source` - a DoubleValuesSource to retrieve double values per document
  `rangeFactory` - a DoubleRangeFactory that defines how to group the double values into range buckets

## Method Details

### setNextReader

public void setNextReader(LeafReaderContext readerContext) throws IOException
Description copied from class: `GroupSelector`
Set the LeafReaderContext

Specified by:
  `setNextReader` in class `GroupSelector<DoubleRange>`
Throws:
  `IOException`

### setScorer

public void setScorer(Scorable scorer) throws IOException
Description copied from class: `GroupSelector`
Set the current Scorer

Specified by:
  `setScorer` in class `GroupSelector<DoubleRange>`
Throws:
  `IOException`

### advanceTo

public GroupSelector.State advanceTo(int doc) throws IOException
Description copied from class: `GroupSelector`
Advance the GroupSelector's iterator to the given document

Specified by:
  `advanceTo` in class `GroupSelector<DoubleRange>`
Throws:
  `IOException`

### currentValue

public DoubleRange currentValue() throws IOException
Description copied from class: `GroupSelector`
Get the group value of the current document

N.B. this object may be reused, for a persistent version use `GroupSelector.copyValue()`

Specified by:
  `currentValue` in class `GroupSelector<DoubleRange>`
Throws:
  `IOException`

### copyValue

public DoubleRange copyValue() throws IOException

Specified by:
  `copyValue` in class `GroupSelector<DoubleRange>`
Returns:
  a copy of the group value of the current document
Throws:
  `IOException`

### setGroups

public void setGroups(Collection<SearchGroup<DoubleRange>> searchGroups)
Description copied from class: `GroupSelector`
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`

Specified by:
  `setGroups` in class `GroupSelector<DoubleRange>`
Parameters:
  `searchGroups` - a set of `SearchGroup` objects to limit selections to