DenseLiveDocs.Builder (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util, class: DenseLiveDocs, class: Builder

Package org.apache.lucene.util

# Class DenseLiveDocs.Builder

java.lang.Object
org.apache.lucene.util.DenseLiveDocs.Builder

Enclosing class:
  `DenseLiveDocs`

public static final class DenseLiveDocs.Builder extends Object
Builder for creating DenseLiveDocs instances with optional pre-computed deleted count.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DenseLiveDocs`
  `build()`
  Builds the DenseLiveDocs instance.
  `DenseLiveDocs.Builder`
  `withDeletedCount(int deletedCount)`
  Sets the pre-computed deleted document count, avoiding cardinality computation.

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

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

- ## Method Details

  - ### withDeletedCount

    public DenseLiveDocs.Builder withDeletedCount(int deletedCount)
    Sets the pre-computed deleted document count, avoiding cardinality computation.
    Parameters:
      `deletedCount` - the number of deleted documents
    Returns:
      this builder

  - ### build

    public DenseLiveDocs build()
    Builds the DenseLiveDocs instance.
    Returns:
      a new DenseLiveDocs instance
    Throws:
      `IllegalArgumentException` - if deletedCount is outside valid range [0, maxDoc]