NumericComparator.CompetitiveDISIBuilder (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search.comparators, class: NumericComparator, class: CompetitiveDISIBuilder

Package org.apache.lucene.search.comparators

# Class NumericComparator.CompetitiveDISIBuilder

java.lang.Object
org.apache.lucene.search.comparators.NumericComparator.CompetitiveDISIBuilder

Enclosing class:
  `NumericComparator<T extends Number>`

protected abstract class NumericComparator.CompetitiveDISIBuilder extends Object
Constructs a competitive iterator which can be updated during collection

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final NumericComparator<T>.NumericLeafComparator`
  `leafComparator`
  The LeafComparator for the current segment
  `protected final int`
  `maxDoc`
  maxDoc of the current segment
  `protected long`
  `maxValueAsLong`
  The current maximum value encoded as a long
  `protected long`
  `minValueAsLong`
  The current minimum value encoded as a long

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CompetitiveDISIBuilder(NumericComparator<T>.NumericLeafComparator leafComparator)`
  Create a new CompetitiveDISIBuilder

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract void`
  `doUpdateCompetitiveIterator()`
  Build a new DocIdSetIterator to use as a competitive iterator, if the new iterator will filter out enough documents.
  `protected abstract boolean`
  `hasMissingDocs()`
  Are there documents in this segment with no value for the comparator to use
  `protected final void`
  `updateCompetitiveIterator(DocIdSetIterator iterator)`
  Use a new iterator as the competitive iterator for collection

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### maxDoc

    protected final int maxDoc
    maxDoc of the current segment

  - ### leafComparator

    protected final NumericComparator<T extends Number>.NumericLeafComparator leafComparator
    The LeafComparator for the current segment

  - ### minValueAsLong

    protected long minValueAsLong
    The current minimum value encoded as a long

  - ### maxValueAsLong

    protected long maxValueAsLong
    The current maximum value encoded as a long

- ## Constructor Details

  - ### CompetitiveDISIBuilder

    protected CompetitiveDISIBuilder(NumericComparator<T>.NumericLeafComparator leafComparator)
    Create a new CompetitiveDISIBuilder

- ## Method Details

  - ### hasMissingDocs

    protected abstract boolean hasMissingDocs()
    Are there documents in this segment with no value for the comparator to use

  - ### doUpdateCompetitiveIterator

    protected abstract void doUpdateCompetitiveIterator() throws IOException
    Build a new DocIdSetIterator to use as a competitive iterator, if the new iterator will filter out enough documents. Implementations should pass their newly built iterators to `updateCompetitiveIterator(DocIdSetIterator)`
    Throws:
      `IOException`

  - ### updateCompetitiveIterator

    protected final void updateCompetitiveIterator(DocIdSetIterator iterator)
    Use a new iterator as the competitive iterator for collection