Class TextMultiValues

  • Direct Known Subclasses:
    TextMultiValues.DocValuesTextMultiValues

    public abstract class TextMultiValues
    extends Object
    A per-document, unordered sequence of text ordinals.

    Essentially, this is a wrapper around SortedSetDocValues that may support joins, but does not guarantee that ordinals for a given documents are returned in ascending order.

    Some of this code was copied and adapted from org.apache.lucene.index.SortedSetDocValues of Apache Lucene project.

    • Constructor Detail

      • TextMultiValues

        protected TextMultiValues()
        Sole constructor. (For invocation by subclass constructors, typically implicit.)
    • Method Detail

      • advanceExact

        public abstract boolean advanceExact​(int doc)
                                      throws IOException
        Advance this instance to the given document id
        Returns:
        true if there is a value for this document
        Throws:
        IOException
      • hasNextValue

        public abstract boolean hasNextValue()
                                      throws IOException
        Returns:
        true if there is a next value for this document, i.e. if nextValue() can be called.
        Throws:
        IOException
      • nextOrd

        public abstract long nextOrd()
                              throws IOException
        Returns:
        The next value for the current document. Can only be called after hasNextValue() returned true.
        Throws:
        IOException
      • getValueCount

        public abstract long getValueCount()
        Returns the number of unique values.
        Returns:
        number of unique values in this SortedDocValues. This is also equivalent to one plus the maximum ordinal.
      • fromDocValues

        public static TextMultiValues fromDocValues​(org.apache.lucene.index.SortedSetDocValues docValues)