Class TextMultiValuesToSingleValuesSource
java.lang.Object
org.hibernate.search.backend.lucene.lowlevel.docvalues.impl.TextMultiValuesToSingleValuesSource
A source of
SortedDocValues (text doc values) with multiple values per document,
where multiple values are "aggregated" into a single value
according to a given MultiValueMode.
Some of this code was copied and adapted from
org.elasticsearch.search.MultiValueMode
from the Elasticsearch project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MultiValueModeprotected final NestedDocsProvider -
Constructor Summary
ConstructorsConstructorDescriptionTextMultiValuesToSingleValuesSource(MultiValueMode mode, NestedDocsProvider nestedDocsProvider) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfromField(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 Details
-
mode
-
nestedDocsProvider
-
-
Constructor Details
-
TextMultiValuesToSingleValuesSource
public TextMultiValuesToSingleValuesSource(MultiValueMode mode, NestedDocsProvider nestedDocsProvider)
-
-
Method Details
-
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
-
equals
-
hashCode
public int hashCode() -
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)
-