Class TextMultiValuesToSingleValuesSource
- java.lang.Object
-
- org.hibernate.search.backend.lucene.lowlevel.docvalues.impl.TextMultiValuesToSingleValuesSource
-
public abstract class TextMultiValuesToSingleValuesSource extends Object
A source ofSortedDocValues(text doc values) 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 TextMultiValuesToSingleValuesSource(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 TextMultiValuesToSingleValuesSourcefromField(String field, MultiValueMode mode, NestedDocsProvider nested)Creates aTextMultiValuesToSingleValuesSourcethat wraps a text fieldprotected abstract org.apache.lucene.index.SortedSetDocValuesgetSortedSetDocValues(org.apache.lucene.index.LeafReaderContext ctx)org.apache.lucene.index.SortedDocValuesgetValues(org.apache.lucene.index.LeafReaderContext ctx)inthashCode()protected org.apache.lucene.index.SortedDocValuesselect(org.apache.lucene.index.SortedSetDocValues values)protected org.apache.lucene.index.SortedDocValuesselect(org.apache.lucene.index.SortedSetDocValues values, ChildDocIds childDocsWithValues)
-
-
-
Field Detail
-
mode
protected final MultiValueMode mode
-
nestedDocsProvider
protected final NestedDocsProvider nestedDocsProvider
-
-
Constructor Detail
-
TextMultiValuesToSingleValuesSource
public TextMultiValuesToSingleValuesSource(MultiValueMode mode, NestedDocsProvider nestedDocsProvider)
-
-
Method Detail
-
fromField
public static TextMultiValuesToSingleValuesSource fromField(String field, MultiValueMode mode, NestedDocsProvider nested)
Creates aTextMultiValuesToSingleValuesSourcethat wraps a text field- Parameters:
field- the fieldmode- the modenested- the nested provider- Returns:
- DoubleMultiValuesSource
-
getValues
public org.apache.lucene.index.SortedDocValues getValues(org.apache.lucene.index.LeafReaderContext ctx) throws IOException- Throws:
IOException
-
getSortedSetDocValues
protected abstract org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(org.apache.lucene.index.LeafReaderContext ctx) throws IOException- Throws:
IOException
-
select
protected org.apache.lucene.index.SortedDocValues select(org.apache.lucene.index.SortedSetDocValues values)
-
select
protected org.apache.lucene.index.SortedDocValues select(org.apache.lucene.index.SortedSetDocValues values, ChildDocIds childDocsWithValues)
-
-