Class DoubleMultiValuesToSingleValuesSource
- java.lang.Object
-
- org.apache.lucene.search.DoubleValuesSource
-
- org.hibernate.search.backend.lucene.lowlevel.docvalues.impl.DoubleMultiValuesToSingleValuesSource
-
- All Implemented Interfaces:
org.apache.lucene.search.SegmentCacheable
- Direct Known Subclasses:
GeoPointDistanceMultiValuesToSingleValuesSource
public abstract class DoubleMultiValuesToSingleValuesSource extends org.apache.lucene.search.DoubleValuesSourceAn implementation ofDoubleValuesSourcefor docvalues with multiple values per document, where multiple values are "aggregated" into a single value according to a givenMultiValueMode.Some of this code was copied and adapted from
org.elasticsearch.search.MultiValueModefrom the Elasticsearch project.
-
-
Field Summary
Fields Modifier and Type Field Description protected MultiValueModemodeprotected NestedDocsProvidernestedDocsProvider
-
Constructor Summary
Constructors Constructor Description DoubleMultiValuesToSingleValuesSource(MultiValueMode mode, NestedDocsProvider nestedDocsProvider)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static DoubleMultiValuesToSingleValuesSourcefromDoubleField(String field, MultiValueMode mode, NestedDocsProvider nested)Creates aDoubleMultiValuesToSingleValuesSourcethat wraps a double-valued fieldstatic DoubleMultiValuesToSingleValuesSourcefromFloatField(String field, MultiValueMode mode, NestedDocsProvider nested)Creates aDoubleMultiValuesToSingleValuesSourcethat wraps a float-valued fieldprotected abstract SortedNumericDoubleDocValuesgetSortedNumericDoubleDocValues(org.apache.lucene.index.LeafReaderContext ctx)NumericDoubleValuesgetValues(org.apache.lucene.index.LeafReaderContext ctx, org.apache.lucene.search.DoubleValues scores)inthashCode()protected NumericDoubleValuesselect(SortedNumericDoubleDocValues values)protected NumericDoubleValuesselect(SortedNumericDoubleDocValues values, ChildDocIds childDocsWithValues)-
Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, explain, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, needsScores, rewrite, toLongValuesSource, toString
-
-
-
-
Field Detail
-
mode
protected final MultiValueMode mode
-
nestedDocsProvider
protected final NestedDocsProvider nestedDocsProvider
-
-
Constructor Detail
-
DoubleMultiValuesToSingleValuesSource
public DoubleMultiValuesToSingleValuesSource(MultiValueMode mode, NestedDocsProvider nestedDocsProvider)
-
-
Method Detail
-
fromDoubleField
public static DoubleMultiValuesToSingleValuesSource fromDoubleField(String field, MultiValueMode mode, NestedDocsProvider nested)
Creates aDoubleMultiValuesToSingleValuesSourcethat wraps a double-valued field- Parameters:
field- the fieldmode- the modenested- the nested provider- Returns:
- A
DoubleMultiValuesToSingleValuesSource
-
fromFloatField
public static DoubleMultiValuesToSingleValuesSource fromFloatField(String field, MultiValueMode mode, NestedDocsProvider nested)
Creates aDoubleMultiValuesToSingleValuesSourcethat wraps a float-valued field- Parameters:
field- the fieldmode- the modenested- the nested provider- Returns:
- A
DoubleMultiValuesToSingleValuesSource
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classorg.apache.lucene.search.DoubleValuesSource
-
hashCode
public int hashCode()
- Specified by:
hashCodein classorg.apache.lucene.search.DoubleValuesSource
-
getValues
public NumericDoubleValues getValues(org.apache.lucene.index.LeafReaderContext ctx, org.apache.lucene.search.DoubleValues scores) throws IOException
- Specified by:
getValuesin classorg.apache.lucene.search.DoubleValuesSource- Throws:
IOException
-
getSortedNumericDoubleDocValues
protected abstract SortedNumericDoubleDocValues getSortedNumericDoubleDocValues(org.apache.lucene.index.LeafReaderContext ctx) throws IOException
- Throws:
IOException
-
select
protected NumericDoubleValues select(SortedNumericDoubleDocValues values)
-
select
protected NumericDoubleValues select(SortedNumericDoubleDocValues values, ChildDocIds childDocsWithValues)
-
-