Uses of Class
org.apache.lucene.index.LeafReader
Packages that use LeafReader
Package
Description
The logical representation of a
Document
for indexing and
searching.Code to maintain and access indices.
High-performance single-document main memory Apache Lucene fulltext search index.
Misc index tools and index support.
Monitoring framework
This package contains a flexible graph-based proximity query, TermAutomatonQuery, and geospatial
queries.
Code to search indices.
Highlighting search terms.
Support for index-time and query-time joins.
This package contains several components useful to build a highlighter on top of the
Matches
API.Support for document suggestion
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term
vectors, or analysis.
-
Uses of LeafReader in org.apache.lucene.document
Methods in org.apache.lucene.document with parameters of type LeafReaderModifier and TypeMethodDescriptionprivate Scorer
SpatialQuery.RelationScorerSupplier.getContainsDenseScorer
(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) private Scorer
SpatialQuery.RelationScorerSupplier.getDenseScorer
(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) Scorer used for WITHIN and DISJOINTprotected Scorer
SpatialQuery.RelationScorerSupplier.getScorer
(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) protected ScorerSupplier
BaseShapeDocValuesQuery.getScorerSupplier
(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, ConstantScoreWeight weight, float boost, float score) protected ScorerSupplier
SpatialQuery.getScorerSupplier
(LeafReader reader, SpatialQuery.SpatialVisitor spatialVisitor, ScoreMode scoreMode, ConstantScoreWeight weight, float boost, float score) private Scorer
SpatialQuery.RelationScorerSupplier.getSparseScorer
(LeafReader reader, Weight weight, float boost, ScoreMode scoreMode) Scorer used for INTERSECTS and single value pointsprivate BinaryRangeDocValues
BinaryRangeFieldRangeQuery.getValues
(LeafReader reader, String field) -
Uses of LeafReader in org.apache.lucene.index
Subclasses of LeafReader in org.apache.lucene.indexModifier and TypeClassDescriptionclass
LeafReader implemented by codec APIs.(package private) class
static class
Wrapper class for another FilterAtomicReader.class
AFilterCodecReader
contains another CodecReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.class
AFilterLeafReader
contains another LeafReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.class
AnLeafReader
which reads multiple, parallel indexes.final class
IndexReader implementation over a single segment.(package private) final class
A mergedCodecReader
view of multipleCodecReader
.(package private) static final class
(package private) static final class
final class
AnCodecReader
which supports sorting documents by a givenSort
.Fields in org.apache.lucene.index declared as LeafReaderModifier and TypeFieldDescriptionprotected final LeafReader
FilterLeafReader.in
The underlying LeafReader.private final LeafReader[]
ParallelLeafReader.parallelReaders
private final LeafReader
LeafReaderContext.reader
private final LeafReader
SoftDeletesDirectoryReaderWrapper.SoftDeletesFilterCodecReader.reader
private final LeafReader
SoftDeletesDirectoryReaderWrapper.SoftDeletesFilterLeafReader.reader
private final LeafReader[]
ParallelLeafReader.storedFieldsReaders
Fields in org.apache.lucene.index with type parameters of type LeafReaderModifier and TypeFieldDescriptionprivate final Set
<LeafReader> ParallelLeafReader.completeReaderSet
private final SortedMap
<String, LeafReader> ParallelLeafReader.fieldToReader
protected Comparator
<LeafReader> LiveIndexWriterConfig.leafSorter
The comparator for sorting leaf readers.private final Map
<IndexReader.CacheKey, LeafReader> SoftDeletesDirectoryReaderWrapper.SoftDeletesSubReaderWrapper.mapping
private final Map
<String, LeafReader> ParallelLeafReader.termsFieldToReader
private final SortedMap
<String, LeafReader> ParallelLeafReader.tvFieldToReader
Methods in org.apache.lucene.index that return LeafReaderModifier and TypeMethodDescriptionFilterLeafReader.getDelegate()
Returns the wrappedLeafReader
.private LeafReader
IndexingChain.getDocValuesLeafReader()
ParallelLeafReader.getParallelReaders()
Returns theLeafReader
s that were passed on init.private static LeafReader[]
ParallelCompositeReader.prepareLeafReaders
(CompositeReader[] readers, CompositeReader[] storedFieldsReaders) LeafReaderContext.reader()
static LeafReader
FilterLeafReader.unwrap
(LeafReader reader) Get the wrapped instance byreader
as long as this reader is an instance ofFilterLeafReader
.ExitableDirectoryReader.ExitableSubReaderWrapper.wrap
(LeafReader reader) protected LeafReader[]
FilterDirectoryReader.SubReaderWrapper.wrap
(List<? extends LeafReader> readers) Wraps a list of LeafReadersabstract LeafReader
FilterDirectoryReader.SubReaderWrapper.wrap
(LeafReader reader) Wrap one of the parent DirectoryReader's subreadersprotected LeafReader[]
SoftDeletesDirectoryReaderWrapper.SoftDeletesSubReaderWrapper.wrap
(List<? extends LeafReader> readers) SoftDeletesDirectoryReaderWrapper.SoftDeletesSubReaderWrapper.wrap
(LeafReader reader) (package private) static LeafReader
SoftDeletesDirectoryReaderWrapper.wrap
(LeafReader reader, String field) Methods in org.apache.lucene.index that return types with arguments of type LeafReaderModifier and TypeMethodDescriptionLiveIndexWriterConfig.getLeafSorter()
Returns a comparator for sorting leaf readers.Methods in org.apache.lucene.index with parameters of type LeafReaderModifier and TypeMethodDescriptionprivate static boolean
SoftDeletesDirectoryReaderWrapper.assertDocCounts
(int expectedNumDocs, int numSoftDeletes, LeafReader reader) private static void
DocValues.checkField
(LeafReader in, String field, DocValuesType... expected) IndexSorter.NumericDocValuesProvider.get
(LeafReader reader) Returns the NumericDocValues instance for this LeafReaderIndexSorter.SortedDocValuesProvider.get
(LeafReader reader) Returns the SortedDocValues instance for this LeafReaderstatic BinaryDocValues
DocValues.getBinary
(LeafReader reader, String field) Returns BinaryDocValues for the field, orDocValues.emptyBinary()
if it has none.IndexSorter.DoubleSorter.getDocComparator
(LeafReader reader, int maxDoc) IndexSorter.FloatSorter.getDocComparator
(LeafReader reader, int maxDoc) IndexSorter.getDocComparator
(LeafReader reader, int maxDoc) Get a comparator that determines the sort order of docs within a single Reader.IndexSorter.IntSorter.getDocComparator
(LeafReader reader, int maxDoc) IndexSorter.LongSorter.getDocComparator
(LeafReader reader, int maxDoc) IndexSorter.StringSorter.getDocComparator
(LeafReader reader, int maxDoc) static NumericDocValues
DocValues.getNumeric
(LeafReader reader, String field) Returns NumericDocValues for the field, orDocValues.emptyNumeric()
if it has none.static SortedDocValues
DocValues.getSorted
(LeafReader reader, String field) Returns SortedDocValues for the field, orDocValues.emptySorted()
if it has none.static SortedNumericDocValues
DocValues.getSortedNumeric
(LeafReader reader, String field) Returns SortedNumericDocValues for the field, orDocValues.emptySortedNumeric()
if it has none.static SortedSetDocValues
DocValues.getSortedSet
(LeafReader reader, String field) Returns SortedSetDocValues for the field, orDocValues.emptySortedSet()
if it has none.static Terms
Terms.getTerms
(LeafReader reader, String field) Returns theTerms
index for this field, orTerms.EMPTY
if it has none.private static PointsReader
SlowCodecReaderWrapper.pointValuesToReader
(LeafReader reader) private static DocValuesProducer
SlowCodecReaderWrapper.readerToDocValuesProducer
(LeafReader reader) private static FieldsProducer
SlowCodecReaderWrapper.readerToFieldsProducer
(LeafReader reader) private static NormsProducer
SlowCodecReaderWrapper.readerToNormsProducer
(LeafReader reader) private static StoredFieldsReader
SlowCodecReaderWrapper.readerToStoredFieldsReader
(LeafReader reader) private static TermVectorsReader
SlowCodecReaderWrapper.readerToTermVectorsReader
(LeafReader reader) private static KnnVectorsReader
SlowCodecReaderWrapper.readerToVectorReader
(LeafReader reader) (package private) Sorter.DocMap
Sorter.sort
(LeafReader reader) Returns a mapping from the old document ID to its new location in the sorted index.static LeafReader
FilterLeafReader.unwrap
(LeafReader reader) Get the wrapped instance byreader
as long as this reader is an instance ofFilterLeafReader
.void
IndexWriter.IndexReaderWarmer.warm
(LeafReader reader) Invoked on theLeafReader
for the newly merged segment, before that segment is made visible to near-real-time readers.void
SimpleMergedSegmentWarmer.warm
(LeafReader reader) ExitableDirectoryReader.ExitableSubReaderWrapper.wrap
(LeafReader reader) abstract LeafReader
FilterDirectoryReader.SubReaderWrapper.wrap
(LeafReader reader) Wrap one of the parent DirectoryReader's subreadersstatic CodecReader
SlowCodecReaderWrapper.wrap
(LeafReader reader) Returns aCodecReader
view of reader.SoftDeletesDirectoryReaderWrapper.SoftDeletesSubReaderWrapper.wrap
(LeafReader reader) (package private) static LeafReader
SoftDeletesDirectoryReaderWrapper.wrap
(LeafReader reader, String field) Method parameters in org.apache.lucene.index with type arguments of type LeafReaderModifier and TypeMethodDescriptionIndexSorter.DoubleSorter.getComparableProviders
(List<? extends LeafReader> readers) IndexSorter.FloatSorter.getComparableProviders
(List<? extends LeafReader> readers) IndexSorter.getComparableProviders
(List<? extends LeafReader> readers) Get an array ofIndexSorter.ComparableProvider
, one per segment, for merge sorting documents in different segmentsIndexSorter.IntSorter.getComparableProviders
(List<? extends LeafReader> readers) IndexSorter.LongSorter.getComparableProviders
(List<? extends LeafReader> readers) IndexSorter.StringSorter.getComparableProviders
(List<? extends LeafReader> readers) static DirectoryReader
DirectoryReader.open
(IndexCommit commit, int minSupportedMajorVersion, Comparator<LeafReader> leafSorter) Expert: returns an IndexReader reading the index on the givenIndexCommit
.static DirectoryReader
DirectoryReader.open
(Directory directory, Comparator<LeafReader> leafSorter) Returns a IndexReader for the the index in the given Directory(package private) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, int minSupportedMajorVersion, IndexCommit commit, Comparator<LeafReader> leafSorter) called from DirectoryReader.open(...) methods(package private) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, IndexCommit commit, Comparator<LeafReader> leafSorter) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Comparator<LeafReader> leafSorter) This constructor is only used forStandardDirectoryReader.doOpenIfChanged(SegmentInfos)
, as well as NRT replication.static DirectoryReader
StandardDirectoryReader.open
(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Comparator<LeafReader> leafSorter) This constructor is only used forStandardDirectoryReader.doOpenIfChanged(SegmentInfos)
, as well as NRT replication.IndexWriterConfig.setLeafSorter
(Comparator<LeafReader> leafSorter) Set the comparator for sorting leaf readers.protected LeafReader[]
FilterDirectoryReader.SubReaderWrapper.wrap
(List<? extends LeafReader> readers) Wraps a list of LeafReadersprotected LeafReader[]
SoftDeletesDirectoryReaderWrapper.SoftDeletesSubReaderWrapper.wrap
(List<? extends LeafReader> readers) Constructors in org.apache.lucene.index with parameters of type LeafReaderModifierConstructorDescriptionprotected
DirectoryReader
(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter) Expert: Constructs aDirectoryReader
on the given subReaders.ExitableFilterAtomicReader
(LeafReader in, QueryTimeout queryTimeout) Constructor *protected
Construct a FilterLeafReader based on the specified base reader.(package private)
LeafReaderContext
(CompositeReaderContext parent, LeafReader reader, int ord, int docBase, int leafOrd, int leafDocBase) Creates a newLeafReaderContext
(package private)
LeafReaderContext
(LeafReader leafReader) ParallelLeafReader
(boolean closeSubReaders, LeafReader... readers) Create a ParallelLeafReader based on the provided readers.ParallelLeafReader
(boolean closeSubReaders, LeafReader[] readers, LeafReader[] storedFieldsReaders) Expert: create a ParallelLeafReader based on the provided readers and storedFieldReaders; when a document is loaded, only storedFieldsReaders will be used.ParallelLeafReader
(LeafReader... readers) Create a ParallelLeafReader based on the provided readers; auto-closes the given readers onIndexReader.close()
.private
SoftDeletesFilterLeafReader
(LeafReader reader, FixedBitSet bits, int numDocs) (package private)
StandardDirectoryReader
(Directory directory, LeafReader[] readers, IndexWriter writer, SegmentInfos sis, Comparator<LeafReader> leafSorter, boolean applyAllDeletes, boolean writeAllDeletes) package private constructor, called only from static open() methods.(package private)
TermDocsIterator
(LeafReader reader, boolean sortedTerms) Constructor parameters in org.apache.lucene.index with type arguments of type LeafReaderModifierConstructorDescriptionprotected
DirectoryReader
(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter) Expert: Constructs aDirectoryReader
on the given subReaders.SoftDeletesSubReaderWrapper
(Map<IndexReader.CacheKey, LeafReader> oldReadersCache, String field) (package private)
StandardDirectoryReader
(Directory directory, LeafReader[] readers, IndexWriter writer, SegmentInfos sis, Comparator<LeafReader> leafSorter, boolean applyAllDeletes, boolean writeAllDeletes) package private constructor, called only from static open() methods. -
Uses of LeafReader in org.apache.lucene.index.memory
Subclasses of LeafReader in org.apache.lucene.index.memoryModifier and TypeClassDescriptionprivate final class
Search support for Lucene framework integration; implements all methods required by the Lucene IndexReader contracts. -
Uses of LeafReader in org.apache.lucene.misc.index
Subclasses of LeafReader in org.apache.lucene.misc.indexModifier and TypeClassDescriptionprivate static class
private static final class
private static class
-
Uses of LeafReader in org.apache.lucene.monitor
Fields in org.apache.lucene.monitor declared as LeafReaderModifier and TypeFieldDescriptionprivate final LeafReader
DocumentBatch.MultiDocumentBatch.reader
private final LeafReader
DocumentBatch.SingletonDocumentBatch.reader
Methods in org.apache.lucene.monitor that return LeafReaderModifier and TypeMethodDescriptionprivate LeafReader
DocumentBatch.MultiDocumentBatch.build
(IndexWriter writer, Document... docs) DocumentBatch.MultiDocumentBatch.get()
DocumentBatch.SingletonDocumentBatch.get()
Methods in org.apache.lucene.monitor with parameters of type LeafReaderModifier and TypeMethodDescriptionprivate Query
TermFilteredPresearcher.buildFilterClause
(LeafReader reader, String field) private Query
TermFilteredPresearcher.buildFilterFields
(LeafReader reader) abstract Query
Presearcher.buildQuery
(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) Build a query for a Monitor's queryindex from a LeafReader over a set of documents to monitor.final Query
TermFilteredPresearcher.buildQuery
(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) -
Uses of LeafReader in org.apache.lucene.sandbox.search
Constructors in org.apache.lucene.sandbox.search with parameters of type LeafReaderModifierConstructorDescription(package private)
MultiNormsLeafSimScorer
(Similarity.SimScorer scorer, LeafReader reader, Collection<CombinedFieldQuery.FieldAndWeight> normFields, boolean needsScores) Sole constructor: Score documents ofreader
withscorer
. -
Uses of LeafReader in org.apache.lucene.search
Methods in org.apache.lucene.search with parameters of type LeafReaderModifier and TypeMethodDescriptionstatic DocIdSetIterator
FieldExistsQuery.getDocValuesDocIdSetIterator
(String field, LeafReader reader) Returns aDocIdSetIterator
from the given field or null if the field doesn't exist in the reader or if the reader has no doc values for the field.private NumericDocValues
SortedNumericSortField.getValue
(LeafReader reader) private SortedDocValues
SortedSetSortField.getValues
(LeafReader reader) private static boolean
PhraseQuery.termNotInReader
(LeafReader reader, Term term) private boolean
TermQuery.TermWeight.termNotInReader
(LeafReader reader, Term term) Constructors in org.apache.lucene.search with parameters of type LeafReaderModifierConstructorDescriptionLeafSimScorer
(Similarity.SimScorer scorer, LeafReader reader, String field, boolean needsScores) Sole constructor: Score documents ofreader
withscorer
. -
Uses of LeafReader in org.apache.lucene.search.highlight
Subclasses of LeafReader in org.apache.lucene.search.highlightModifier and TypeClassDescriptionclass
Wraps a Terms with aLeafReader
, typically from term vectors.(package private) static final class
Fields in org.apache.lucene.search.highlight declared as LeafReaderConstructors in org.apache.lucene.search.highlight with parameters of type LeafReader -
Uses of LeafReader in org.apache.lucene.search.join
Methods in org.apache.lucene.search.join with parameters of type LeafReader -
Uses of LeafReader in org.apache.lucene.search.matchhighlight
Fields in org.apache.lucene.search.matchhighlight declared as LeafReaderMethods in org.apache.lucene.search.matchhighlight with parameters of type LeafReaderModifier and TypeMethodDescriptionvoid
MatchRegionRetriever.MatchOffsetsConsumer.accept
(int docId, LeafReader leafReader, int leafDocId, Map<String, List<OffsetRange>> hits) Constructors in org.apache.lucene.search.matchhighlight with parameters of type LeafReaderModifierConstructorDescription(package private)
DocHit
(int docId, LeafReader leafReader, int leafDocId) -
Uses of LeafReader in org.apache.lucene.search.suggest.document
Fields in org.apache.lucene.search.suggest.document declared as LeafReaderConstructors in org.apache.lucene.search.suggest.document with parameters of type LeafReaderModifierConstructorDescriptionprotected
CompletionScorer
(CompletionWeight weight, NRTSuggester suggester, LeafReader reader, Bits filterDocs, boolean filtered, Automaton automaton) Creates a scorer for a field-specificsuggester
scoped byacceptDocs
-
Uses of LeafReader in org.apache.lucene.search.uhighlight
Subclasses of LeafReader in org.apache.lucene.search.uhighlightModifier and TypeClassDescriptionclass
Overlays a 2nd LeafReader for the terms of one field, otherwise the primary reader is consulted.private static final class
Needed to support the ability to highlight a query irrespective of the field a query refers to (aka requireFieldMatch=false).(package private) final class
A filtered LeafReader that only includes the terms that are also in a provided set of terms.private static class
Wraps an IndexReader that remembers/caches the last call toTermVectors.get(int)
so that if the next call has the same ID, then it is reused.Fields in org.apache.lucene.search.uhighlight declared as LeafReaderModifier and TypeFieldDescriptionprivate final LeafReader
OverlaySingleDocTermsLeafReader.in2
private final LeafReader
MemoryIndexOffsetStrategy.memIndexLeafReader
Methods in org.apache.lucene.search.uhighlight with parameters of type LeafReaderModifier and TypeMethodDescriptionprotected OffsetsEnum
FieldOffsetStrategy.createOffsetsEnumFromReader
(LeafReader leafReader, int doc) void
PhraseHelper.createOffsetsEnumsForSpans
(LeafReader leafReader, int docId, List<OffsetsEnum> results) Given the internal SpanQueries, produce a number of OffsetsEnum into theresults
param.protected void
FieldOffsetStrategy.createOffsetsEnumsWeightMatcher
(LeafReader _leafReader, int docId, List<OffsetsEnum> results) abstract OffsetsEnum
FieldOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) The primary method -- return offsets for highlightable words in the specified document.MemoryIndexOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) NoOpOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) PostingsOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) PostingsWithTermVectorsOffsetStrategy.getOffsetsEnum
(LeafReader leafReader, int docId, String content) TermVectorOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) TokenStreamOffsetStrategy.getOffsetsEnum
(LeafReader reader, int docId, String content) FieldHighlighter.highlightFieldForDoc
(LeafReader reader, int docId, String content) The primary method -- highlight this doc, assuming a specific field and given this content.Constructors in org.apache.lucene.search.uhighlight with parameters of type LeafReaderModifierConstructorDescriptionOverlaySingleDocTermsLeafReader
(LeafReader in, LeafReader in2, String in2Field, int in2TargetDocId) (package private)
SingleFieldWithOffsetsFilterLeafReader
(LeafReader in, String fieldName) (package private)
TermVectorFilteredLeafReader
(LeafReader baseLeafReader, Terms filterTerms, String fieldFilter) Construct a FilterLeafReader based on the specified base reader.(package private)