IndexSearcher.LeafSlice (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search, class: IndexSearcher, class: LeafSlice

Package org.apache.lucene.search

# Class IndexSearcher.LeafSlice

java.lang.Object
org.apache.lucene.search.IndexSearcher.LeafSlice

Enclosing class:
  `IndexSearcher`

public static class IndexSearcher.LeafSlice extends Object
A class holding a subset of the `IndexSearcher`s leaf contexts to be executed within a single thread. A leaf slice holds references to one or more `IndexSearcher.LeafReaderContextPartition` instances. Each partition targets a specific doc id range of a `LeafReaderContext`.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final IndexSearcher.LeafReaderContextPartition[]`
  `partitions`
  The leaves that make up this slice.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LeafSlice(List<IndexSearcher.LeafReaderContextPartition> partitions)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getMaxDocs()`
  Returns the total number of docs that a slice targets, by summing the number of docs that each of its leaf context partitions targets.

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

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

- ## Field Details

  - ### partitions

    public final IndexSearcher.LeafReaderContextPartition[] partitions
    The leaves that make up this slice.
    WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Constructor Details

  - ### LeafSlice

    public LeafSlice(List<IndexSearcher.LeafReaderContextPartition> partitions)

- ## Method Details

  - ### getMaxDocs

    public int getMaxDocs()
    Returns the total number of docs that a slice targets, by summing the number of docs that each of its leaf context partitions targets.