Uses of Class
org.apache.lucene.index.LeafReader
Package
Description
Code to maintain and access indices.
Code to search indices.
-
Uses of LeafReader in org.apache.lucene.index
Modifier and TypeClassDescriptionclass
LeafReader implemented by codec APIs.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.final class
AnCodecReader
which supports sorting documents by a givenSort
.Modifier and TypeFieldDescriptionprotected final LeafReader
FilterLeafReader.in
The underlying LeafReader.Modifier and TypeFieldDescriptionprotected Comparator<LeafReader>
LiveIndexWriterConfig.leafSorter
The comparator for sorting leaf readers.Modifier and TypeMethodDescriptionFilterLeafReader.getDelegate()
Returns the wrappedLeafReader
.ParallelLeafReader.getParallelReaders()
Returns theLeafReader
s that were passed on init.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 subreadersModifier and TypeMethodDescriptionLiveIndexWriterConfig.getLeafSorter()
Returns a comparator for sorting leaf readers.Modifier and TypeMethodDescriptionIndexSorter.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.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.Modifier 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 Directorystatic 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 LeafReadersModifierConstructorDescriptionprotected
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.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()
.ModifierConstructorDescriptionprotected
DirectoryReader
(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter) Expert: Constructs aDirectoryReader
on the given subReaders. -
Uses of LeafReader in org.apache.lucene.search
Modifier and TypeMethodDescriptionstatic DocIdSetIterator
DocValuesFieldExistsQuery.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.ModifierConstructorDescriptionLeafSimScorer
(Similarity.SimScorer scorer, LeafReader reader, String field, boolean needsScores) Sole constructor: Score documents ofreader
withscorer
.