Uses of Class org.apache.lucene.index.LeafReaderContext (Lucene 10.5.0 core API)
Description: use: package: org.apache.lucene.index, class: LeafReaderContext

# Uses of Class
org.apache.lucene.index.LeafReaderContext

Packages that use LeafReaderContext
Package
Description
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.comparators
Comparators, used to compare hits so as to determine their sort order when collecting the top results with `TopFieldCollector`.
org.apache.lucene.search.knn
Classes related to vector search: knn and vector fields.

- ## Uses of LeafReaderContext in org.apache.lucene.index

  Methods in org.apache.lucene.index that return LeafReaderContext
  Modifier and Type
  Method
  Description
  `final LeafReaderContext`
  LeafReader.`getContext()`
  Methods in org.apache.lucene.index that return types with arguments of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `List<LeafReaderContext>`
  CompositeReaderContext.`leaves()`
  `final List<LeafReaderContext>`
  IndexReader.`leaves()`
  Returns the reader's leaves, or itself if this reader is atomic.
  `abstract List<LeafReaderContext>`
  IndexReaderContext.`leaves()`
  Returns the context's leaves if this context is a top-level context.
  `List<LeafReaderContext>`
  LeafReaderContext.`leaves()`
  Methods in org.apache.lucene.index with parameters of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `IOSupplier<TermState>`
  TermStates.`get(LeafReaderContext ctx)`
  Returns a `Supplier` for a `TermState` for the given `LeafReaderContext`.
  `static boolean`
  DocValues.`isCacheable(LeafReaderContext ctx, String... fields)`
  Returns `true` if the specified docvalues fields have not been updated
  Method parameters in org.apache.lucene.index with type arguments of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `static int[][]`
  ReaderUtil.`partitionByLeaf(ScoreDoc[] hits, List<LeafReaderContext> leaves)`
  Partitions global doc IDs from ScoreDoc array by leaf.
  `static int`
  ReaderUtil.`subIndex(int n, List<LeafReaderContext> leaves)`
  Returns index of the searcher/reader for document `n` in the array used to construct this searcher/reader.

- ## Uses of LeafReaderContext in org.apache.lucene.search

  Fields in org.apache.lucene.search declared as LeafReaderContext
  Modifier and Type
  Field
  Description
  `final LeafReaderContext`
  IndexSearcher.LeafReaderContextPartition.`ctx`
  Fields in org.apache.lucene.search with type parameters of type LeafReaderContext
  Modifier and Type
  Field
  Description
  `protected final List<LeafReaderContext>`
  IndexSearcher.`leafContexts`
  Methods in org.apache.lucene.search that return types with arguments of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `List<LeafReaderContext>`
  IndexSearcher.`getLeafContexts()`
  Expert: returns leaf contexts associated with this searcher.
  Methods in org.apache.lucene.search with parameters of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `protected TopDocs`
  ByteVectorSimilarityQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitLimit, KnnCollectorManager knnCollectorManager)`
  `protected TopDocs`
  FloatVectorSimilarityQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitLimit, KnnCollectorManager knnCollectorManager)`
  `protected TopDocs`
  KnnByteVectorQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager)`
  `protected TopDocs`
  KnnFloatVectorQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager)`
  `protected TopDocs`
  PatienceKnnVectorQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager)`
  `protected TopDocs`
  SeededKnnVectorQuery.`approximateSearch(LeafReaderContext context, AcceptDocs acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager)`
  `final BulkScorer`
  Weight.`bulkScorer(LeafReaderContext context)`
  Helper method that delegates to `Weight.scorerSupplier(LeafReaderContext)`.
  `int`
  FilterWeight.`count(LeafReaderContext context)`
  `int`
  Weight.`count(LeafReaderContext context)`
  Counts the number of live documents that match a given `Weight.parentQuery` in a leaf.
  `static IndexSearcher.LeafReaderContextPartition`
  IndexSearcher.LeafReaderContextPartition.`createForEntireSegment(LeafReaderContext ctx)`
  Creates a partition of the provided leaf context that targets the entire segment
  `static IndexSearcher.LeafReaderContextPartition`
  IndexSearcher.LeafReaderContextPartition.`createFromAndTo(LeafReaderContext ctx, int minDocId, int maxDocId)`
  Creates a partition of the provided leaf context that targets a subset of the entire segment, starting from and including the min doc id provided, until and not including the provided max doc id
  `static MatchesIterator`
  MatchesUtils.`disjunction(LeafReaderContext context, int doc, Query query, String field, BytesRefIterator terms)`
  Create a MatchesIterator that is a disjunction over a list of terms extracted from a `BytesRefIterator`.
  `protected void`
  SimpleCollector.`doSetNextReader(LeafReaderContext context)`
  This method is called before collecting `context`.
  `protected abstract void`
  SimpleFieldComparator.`doSetNextReader(LeafReaderContext context)`
  This method is called before collecting `context`.
  `protected TopDocs`
  PatienceKnnVectorQuery.`exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout)`
  `protected TopDocs`
  SeededKnnVectorQuery.`exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout)`
  `Explanation`
  ConstantScoreWeight.`explain(LeafReaderContext context, int doc)`
  `Explanation`
  DisjunctionMaxQuery.DisjunctionMaxWeight.`explain(LeafReaderContext context, int doc)`
  Explain the score we computed for doc
  `Explanation`
  DoubleValuesSource.`explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation)`
  An explanation of the value for the named document.
  `Explanation`
  FilterWeight.`explain(LeafReaderContext context, int doc)`
  `Explanation`
  IndriAndWeight.`explain(LeafReaderContext context, int doc)`
  `Explanation`
  LogOddsFusionQuery.LogOddsFusionWeight.`explain(LeafReaderContext context, int doc)`
  `Explanation`
  PhraseWeight.`explain(LeafReaderContext context, int doc)`
  `abstract Explanation`
  Weight.`explain(LeafReaderContext context, int doc)`
  An explanation of the score computation for the named document.
  `protected BinaryDocValues`
  FieldComparator.TermValComparator.`getBinaryDocValues(LeafReaderContext context, String field)`
  Retrieves the BinaryDocValues for the field in this segment
  `LeafFieldComparator[]`
  FieldValueHitQueue.`getComparators(LeafReaderContext context)`
  `LeafCollector`
  Collector.`getLeafCollector(LeafReaderContext context)`
  Create a new `collector` to collect the given context.
  `LeafCollector`
  FilterCollector.`getLeafCollector(LeafReaderContext context)`
  `LeafCollector`
  MultiCollector.`getLeafCollector(LeafReaderContext context)`
  `LeafCollector`
  PositiveScoresOnlyCollector.`getLeafCollector(LeafReaderContext context)`
  `final LeafCollector`
  SimpleCollector.`getLeafCollector(LeafReaderContext context)`
  `LeafCollector`
  TopScoreDocCollector.`getLeafCollector(LeafReaderContext context)`
  `LeafCollector`
  TotalHitCountCollector.`getLeafCollector(LeafReaderContext context)`
  `abstract LeafFieldComparator`
  FieldComparator.`getLeafComparator(LeafReaderContext context)`
  Get a per-segment `LeafFieldComparator` to collect the given `LeafReaderContext`.
  `LeafFieldComparator`
  FieldComparator.RelevanceComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  FieldComparator.TermValComparator.`getLeafComparator(LeafReaderContext context)`
  `final LeafFieldComparator`
  SimpleFieldComparator.`getLeafComparator(LeafReaderContext context)`
  `protected abstract PhraseMatcher`
  PhraseWeight.`getPhraseMatcher(LeafReaderContext context, Similarity.SimScorer scorer, boolean exposeOffsets)`
  `DoubleValues`
  FullPrecisionFloatVectorSimilarityValuesSource.`getSimilarityScores(LeafReaderContext ctx)`
  Sugar to fetch full precision similarity score values
  `abstract DoubleValues`
  DoubleValuesSource.`getValues(LeafReaderContext ctx, DoubleValues scores)`
  Returns a `DoubleValues` instance for the passed-in LeafReaderContext and scores
  `DoubleValues`
  FullPrecisionFloatVectorSimilarityValuesSource.`getValues(LeafReaderContext ctx, DoubleValues scores)`
  `DoubleValues`
  LateInteractionFloatValuesSource.`getValues(LeafReaderContext ctx, DoubleValues scores)`
  `LongValues`
  LongValuesSource.ConstantLongValuesSource.`getValues(LeafReaderContext ctx, DoubleValues scores)`
  `abstract LongValues`
  LongValuesSource.`getValues(LeafReaderContext ctx, DoubleValues scores)`
  Returns a `LongValues` instance for the passed-in LeafReaderContext and scores
  `boolean`
  DisjunctionMaxQuery.DisjunctionMaxWeight.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  FilterWeight.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  FullPrecisionFloatVectorSimilarityValuesSource.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  IndriAndWeight.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  LateInteractionFloatValuesSource.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  LogOddsFusionQuery.LogOddsFusionWeight.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  LongValuesSource.ConstantLongValuesSource.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  PhraseWeight.`isCacheable(LeafReaderContext ctx)`
  `boolean`
  SegmentCacheable.`isCacheable(LeafReaderContext ctx)`
  `Matches`
  DisjunctionMaxQuery.DisjunctionMaxWeight.`matches(LeafReaderContext context, int doc)`
  `Matches`
  FilterWeight.`matches(LeafReaderContext context, int doc)`
  `Matches`
  LogOddsFusionQuery.LogOddsFusionWeight.`matches(LeafReaderContext context, int doc)`
  `Matches`
  PhraseWeight.`matches(LeafReaderContext context, int doc)`
  `Matches`
  Weight.`matches(LeafReaderContext context, int doc)`
  Returns `Matches` for a specific document, or `null` if the document does not match the parent query
  `KnnCollector`
  TimeLimitingKnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  `final Scorer`
  Weight.`scorer(LeafReaderContext context)`
  Optional method that delegates to scorerSupplier.
  `ScorerSupplier`
  DisjunctionMaxQuery.DisjunctionMaxWeight.`scorerSupplier(LeafReaderContext context)`
  `ScorerSupplier`
  FilterWeight.`scorerSupplier(LeafReaderContext context)`
  `ScorerSupplier`
  IndriAndWeight.`scorerSupplier(LeafReaderContext context)`
  `ScorerSupplier`
  LogOddsFusionQuery.LogOddsFusionWeight.`scorerSupplier(LeafReaderContext context)`
  `ScorerSupplier`
  PhraseWeight.`scorerSupplier(LeafReaderContext context)`
  `abstract ScorerSupplier`
  Weight.`scorerSupplier(LeafReaderContext context)`
  Get a `ScorerSupplier`, which allows knowing the cost of the `Scorer` before building it.
  `protected void`
  IndexSearcher.`searchLeaf(LeafReaderContext ctx, int minDocId, int maxDocId, Weight weight, Collector collector)`
  Lower-level search API
  `static DoubleValues`
  DoubleValuesSource.`similarityToQueryVector(LeafReaderContext ctx, byte[] queryVector, String vectorField)`
  Returns a DoubleValues instance for computing the vector similarity score per document against the byte query vector
  `static DoubleValues`
  DoubleValuesSource.`similarityToQueryVector(LeafReaderContext ctx, float[] queryVector, String vectorField)`
  Returns a DoubleValues instance for computing the vector similarity score per document against the float query vector
  `protected LRUQueryCache.CacheAndCount`
  LRUQueryCache.`tryPopulateCache(IndexReader.CacheHelper cacheKey, Weight weight, ScorerSupplier scorerSupplier, LeafReaderContext context)`
  Populates the cache for the given scorer and leaf reader context.
  Method parameters in org.apache.lucene.search with type arguments of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `protected IndexSearcher.LeafSlice[]`
  IndexSearcher.`slices(List<LeafReaderContext> leaves)`
  Expert: Creates an array of leaf slices each holding a subset of the given leaves.
  `static IndexSearcher.LeafSlice[]`
  IndexSearcher.`slices(List<LeafReaderContext> leaves, int maxDocsPerSlice, int maxSegmentsPerSlice, boolean allowSegmentPartitions)`
  Static method to segregate LeafReaderContexts amongst multiple slices.
  Constructor parameters in org.apache.lucene.search with type arguments of type LeafReaderContext
  Modifier
  Constructor
  Description
  ``
  `LRUQueryCache(int maxSize, long maxRamBytesUsed, Predicate<LeafReaderContext> leavesToCache, float skipCacheFactor)`
  Expert: Create a new instance that will cache at most `maxSize` queries with at most `maxRamBytesUsed` bytes of memory, only on leaves that satisfy `leavesToCache`.

- ## Uses of LeafReaderContext in org.apache.lucene.search.comparators

  Methods in org.apache.lucene.search.comparators with parameters of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `LeafFieldComparator`
  DocComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  DoubleComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  FloatComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  IntComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  LongComparator.`getLeafComparator(LeafReaderContext context)`
  `LeafFieldComparator`
  TermOrdValComparator.`getLeafComparator(LeafReaderContext context)`
  `protected NumericDocValues`
  NumericComparator.NumericLeafComparator.`getNumericDocValues(LeafReaderContext context, String field)`
  Retrieves the NumericDocValues for the field in this segment
  `protected SortedDocValues`
  TermOrdValComparator.`getSortedDocValues(LeafReaderContext context, String field)`
  Retrieves the SortedDocValues for the field in this segment
  Constructors in org.apache.lucene.search.comparators with parameters of type LeafReaderContext
  Modifier
  Constructor
  Description
  ``
  `DoubleLeafComparator(LeafReaderContext context)`
  ``
  `FloatLeafComparator(LeafReaderContext context)`
  ``
  `IntLeafComparator(LeafReaderContext context)`
  ``
  `LongLeafComparator(LeafReaderContext context)`
  ``
  `NumericLeafComparator(LeafReaderContext context)`

- ## Uses of LeafReaderContext in org.apache.lucene.search.knn

  Methods in org.apache.lucene.search.knn with parameters of type LeafReaderContext
  Modifier and Type
  Method
  Description
  `KnnCollector`
  KnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Return a new `KnnCollector` instance.
  `KnnCollector`
  TopKnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Return a new `TopKnnCollector` instance.
  `default KnnCollector`
  KnnCollectorManager.`newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)`
  Return a new `KnnCollector` instance, generally with a specific k value, scaled per leaf statistics
  `KnnCollector`
  TopKnnCollectorManager.`newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)`