Uses of Class
org.apache.lucene.index.LeafReaderContext
Package
Description
Code to maintain and access indices.
Code to search indices.
Comparators, used to compare hits so as to determine their sort order when collecting the top
results with
TopFieldCollector
.-
Uses of LeafReaderContext in org.apache.lucene.index
Modifier and TypeMethodDescriptionCompositeReaderContext.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.LeafReaderContext.leaves()
Modifier and TypeMethodDescriptionTermStates.get
(LeafReaderContext ctx) static boolean
DocValues.isCacheable
(LeafReaderContext ctx, String... fields) Returnstrue
if the specified docvalues fields have not been updatedModifier and TypeMethodDescriptionstatic int
ReaderUtil.subIndex
(int n, List<LeafReaderContext> leaves) Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader. -
Uses of LeafReaderContext in org.apache.lucene.search
Modifier and TypeFieldDescriptionfinal LeafReaderContext[]
IndexSearcher.LeafSlice.leaves
The leaves that make up this slice.Modifier and TypeFieldDescriptionprotected final List<LeafReaderContext>
IndexSearcher.leafContexts
Modifier and TypeMethodDescriptionIndexSearcher.getLeafContexts()
Expert: returns leaf contexts associated with this searcher.Modifier and TypeMethodDescriptionIndriAndWeight.bulkScorer
(LeafReaderContext context) Weight.bulkScorer
(LeafReaderContext context) Optional method, to return aBulkScorer
to score the query and send hits to aCollector
.int
Weight.count
(LeafReaderContext context) Counts the number of live documents that match a givenWeight.parentQuery
in a leaf.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 aBytesRefIterator
.protected void
SimpleCollector.doSetNextReader
(LeafReaderContext context) This method is called before collectingcontext
.protected abstract void
SimpleFieldComparator.doSetNextReader
(LeafReaderContext context) This method is called before collectingcontext
.protected TopDocs
KnnVectorQuery.exactSearch
(LeafReaderContext context, DocIdSetIterator acceptIterator) ConstantScoreWeight.explain
(LeafReaderContext context, int doc) DisjunctionMaxQuery.DisjunctionMaxWeight.explain
(LeafReaderContext context, int doc) Explain the score we computed for docDoubleValuesSource.explain
(LeafReaderContext ctx, int docId, Explanation scoreExplanation) An explanation of the value for the named document.FilterWeight.explain
(LeafReaderContext context, int doc) IndriAndWeight.explain
(LeafReaderContext context, int doc) 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 segmentFieldValueHitQueue.getComparators
(LeafReaderContext context) Collector.getLeafCollector
(LeafReaderContext context) Create a newcollector
to collect the given context.FilterCollector.getLeafCollector
(LeafReaderContext context) MultiCollector.getLeafCollector
(LeafReaderContext context) PositiveScoresOnlyCollector.getLeafCollector
(LeafReaderContext context) final LeafCollector
SimpleCollector.getLeafCollector
(LeafReaderContext context) TimeLimitingCollector.getLeafCollector
(LeafReaderContext context) abstract LeafFieldComparator
FieldComparator.getLeafComparator
(LeafReaderContext context) Get a per-segmentLeafFieldComparator
to collect the givenLeafReaderContext
.FieldComparator.RelevanceComparator.getLeafComparator
(LeafReaderContext context) FieldComparator.TermOrdValComparator.getLeafComparator
(LeafReaderContext context) FieldComparator.TermValComparator.getLeafComparator
(LeafReaderContext context) final LeafFieldComparator
SimpleFieldComparator.getLeafComparator
(LeafReaderContext context) protected abstract PhraseMatcher
PhraseWeight.getPhraseMatcher
(LeafReaderContext context, Similarity.SimScorer scorer, boolean exposeOffsets) protected SortedDocValues
FieldComparator.TermOrdValComparator.getSortedDocValues
(LeafReaderContext context, String field) Retrieves the SortedDocValues for the field in this segmentabstract DoubleValues
DoubleValuesSource.getValues
(LeafReaderContext ctx, DoubleValues scores) Returns aDoubleValues
instance for the passed-in LeafReaderContext and scoresLongValuesSource.ConstantLongValuesSource.getValues
(LeafReaderContext ctx, DoubleValues scores) abstract LongValues
LongValuesSource.getValues
(LeafReaderContext ctx, DoubleValues scores) Returns aLongValues
instance for the passed-in LeafReaderContext and scoresboolean
DisjunctionMaxQuery.DisjunctionMaxWeight.isCacheable
(LeafReaderContext ctx) boolean
FilterWeight.isCacheable
(LeafReaderContext ctx) boolean
IndriAndWeight.isCacheable
(LeafReaderContext ctx) boolean
LongValuesSource.ConstantLongValuesSource.isCacheable
(LeafReaderContext ctx) boolean
PhraseWeight.isCacheable
(LeafReaderContext ctx) boolean
SegmentCacheable.isCacheable
(LeafReaderContext ctx) DisjunctionMaxQuery.DisjunctionMaxWeight.matches
(LeafReaderContext context, int doc) FilterWeight.matches
(LeafReaderContext context, int doc) PhraseWeight.matches
(LeafReaderContext context, int doc) Weight.matches
(LeafReaderContext context, int doc) ReturnsMatches
for a specific document, ornull
if the document does not match the parent queryDisjunctionMaxQuery.DisjunctionMaxWeight.scorer
(LeafReaderContext context) Create the scorer used to score our associated DisjunctionMaxQueryFilterWeight.scorer
(LeafReaderContext context) IndriAndWeight.scorer
(LeafReaderContext context) PhraseWeight.scorer
(LeafReaderContext context) abstract Scorer
Weight.scorer
(LeafReaderContext context) Returns aScorer
which can iterate in order over all matching documents and assign them a score.Weight.scorerSupplier
(LeafReaderContext context) Optional method.Modifier and TypeMethodDescriptionprotected void
IndexSearcher.search
(List<LeafReaderContext> leaves, Weight weight, Collector collector) Lower-level search API.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) Static method to segregate LeafReaderContexts amongst multiple slicesModifierConstructorDescriptionLeafSlice
(List<LeafReaderContext> leavesList) LRUQueryCache
(int maxSize, long maxRamBytesUsed, Predicate<LeafReaderContext> leavesToCache, float skipCacheFactor) Expert: Create a new instance that will cache at mostmaxSize
queries with at mostmaxRamBytesUsed
bytes of memory, only on leaves that satisfyleavesToCache
. -
Uses of LeafReaderContext in org.apache.lucene.search.comparators
Modifier and TypeMethodDescriptionDocComparator.getLeafComparator
(LeafReaderContext context) DoubleComparator.getLeafComparator
(LeafReaderContext context) FloatComparator.getLeafComparator
(LeafReaderContext context) IntComparator.getLeafComparator
(LeafReaderContext context) LongComparator.getLeafComparator
(LeafReaderContext context) protected NumericDocValues
NumericComparator.NumericLeafComparator.getNumericDocValues
(LeafReaderContext context, String field) Retrieves the NumericDocValues for the field in this segmentModifierConstructorDescriptionDoubleLeafComparator
(LeafReaderContext context) FloatLeafComparator
(LeafReaderContext context) IntLeafComparator
(LeafReaderContext context) LongLeafComparator
(LeafReaderContext context) NumericLeafComparator
(LeafReaderContext context)