Class SortedNumericLongValues

java.lang.Object
org.elasticsearch.index.fielddata.SortedNumericLongValues
Direct Known Subclasses:
BooleanScriptDocValues, GeoPointScriptDocValues, LongScriptDocValues, SortingNumericLongValues, SourceValueFetcherSortedNumericIndexFieldData.SourceValueFetcherSortedNumericDocValues

public abstract class SortedNumericLongValues extends Object
A multivalued version of LongValues
  • Field Details

  • Constructor Details

    • SortedNumericLongValues

      public SortedNumericLongValues()
  • Method Details

    • advanceExact

      public abstract boolean advanceExact(int target) throws IOException
      Advance the iterator to exactly target and return whether target has a value. target must be greater than or equal to the current doc ID and must be a valid doc ID, ie. ≥ 0 and < maxDoc.
      Throws:
      IOException
    • nextValue

      public abstract long nextValue() throws IOException
      Iterates to the next value in the current document. Do not call this more than docValueCount() times for the document.
      Throws:
      IOException
    • docValueCount

      public abstract int docValueCount()
      Retrieves the number of values for the current document. This must always be greater than zero. It is illegal to call this method after advanceExact(int) returned false.
    • unwrapSingleton

      public static org.apache.lucene.search.LongValues unwrapSingleton(SortedNumericLongValues values)
      Converts a SortedNumericLongValues values to a singly valued LongValues if possible
    • singleton

      public static SortedNumericLongValues singleton(org.apache.lucene.search.LongValues values)
      Converts a LongValues to a SortedNumericLongValues
    • wrap

      public static SortedNumericLongValues wrap(org.apache.lucene.index.SortedNumericDocValues values)
      Converts a SortedNumericDocValues iterator to a SortedNumericLongValues Note that if the wrapped iterator can be unwrapped to a singleton NumericDocValues instance, then the returned SortedNumericLongValues can also be unwrapped to a LongValues instance via unwrapSingleton(SortedNumericLongValues)