Class DocValuesRangeIterator

java.lang.Object
org.apache.lucene.search.TwoPhaseIterator
org.apache.lucene.search.DocValuesRangeIterator

public abstract sealed class DocValuesRangeIterator extends TwoPhaseIterator
A TwoPhaseIterator over doc values that skips documents with values that lie outside a specific range, using a SkipBlockRangeIterator as an approximation
WARNING: This API is experimental and might change in incompatible ways in the next release.
  • Method Details

    • forRange

      public static DocValuesRangeIterator forRange(NumericDocValues values, DocValuesSkipper skipper, long min, long max)
      Creates a DocValuesRangeIterator over a NumericDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      min - skip documents with values lower than this
      max - skip documents with values higher than this
    • forRange

      public static DocValuesRangeIterator forRange(SortedNumericDocValues values, DocValuesSkipper skipper, long min, long max)
      Creates a DocValuesRangeIterator over a SortedNumericDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      min - skip documents with all values lower than this
      max - skip documents with all values higher than this
    • forOrdinalRange

      public static DocValuesRangeIterator forOrdinalRange(SortedDocValues values, DocValuesSkipper skipper, long min, long max)
      Creates a DocValuesRangeIterator over a SortedDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      min - skip documents with ordinal values lower than this
      max - skip documents with ordinal values higher than this
    • forOrdinalRange

      public static DocValuesRangeIterator forOrdinalRange(SortedSetDocValues values, DocValuesSkipper skipper, long min, long max)
      Creates a DocValuesRangeIterator over a SortedSetDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      min - skip documents with all ordinal values lower than this
      max - skip documents with all ordinal values higher than this
    • forOrdinalSet

      public static DocValuesRangeIterator forOrdinalSet(SortedDocValues values, DocValuesSkipper skipper, TermsEnum terms) throws IOException
      Creates a DocValuesRangeIterator over a SortedDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      terms - a TermsEnum containing the ordinal values to match
      Throws:
      IOException
    • forOrdinalSet

      public static DocValuesRangeIterator forOrdinalSet(SortedSetDocValues values, DocValuesSkipper skipper, TermsEnum terms) throws IOException
      Creates a DocValuesRangeIterator over a SortedSetDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      terms - a TermsEnum containing the ordinal values to match
      Throws:
      IOException
    • forOrdinalSet

      public static DocValuesRangeIterator forOrdinalSet(SortedSetDocValues values, DocValuesSkipper skipper, long minOrd, long maxOrd, LongBitSet ords)
      Creates a DocValuesRangeIterator over a SortedSetDocValues instance
      Parameters:
      values - the doc values
      skipper - an optional skipper to exclude non-matching blocks
      minOrd - skip documents with all ordinal values lower than this
      maxOrd - skip documents with all ordinal values higher than this
      ords - skip documents with all values not in this set