Class TextMultiValuesToSingleValuesSource

java.lang.Object
org.hibernate.search.backend.lucene.lowlevel.docvalues.impl.TextMultiValuesToSingleValuesSource

public abstract class TextMultiValuesToSingleValuesSource extends Object
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 Details

  • Constructor Details

  • Method Details

    • fromField

      public static TextMultiValuesToSingleValuesSource fromField(String field, MultiValueMode mode, NestedDocsProvider nested)
      Creates a TextMultiValuesToSingleValuesSource that wraps a text field
      Parameters:
      field - the field
      mode - the mode
      nested - the nested provider
      Returns:
      DoubleMultiValuesSource
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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)