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

Packages that use LeafReader
Package
Description
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.search
Code to search indices.

## Uses of LeafReader in org.apache.lucene.index

Subclasses of LeafReader in org.apache.lucene.index
Modifier and Type
Class
Description
`class`
`CodecReader`
LeafReader implemented by codec APIs.
`static class`
`ExitableDirectoryReader.ExitableFilterAtomicReader`
Wrapper class for another FilterAtomicReader.
`class`
`FilterCodecReader`
A `FilterCodecReader` contains another CodecReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
`class`
`FilterLeafReader`
A `FilterLeafReader` contains another LeafReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
`class`
`ParallelLeafReader`
An `LeafReader` which reads multiple, parallel indexes.
`final class`
`SegmentReader`
IndexReader implementation over a single segment.
`final class`
`SortingCodecReader`
An `CodecReader` which supports sorting documents by a given `Sort`.
Fields in org.apache.lucene.index declared as LeafReader
Modifier and Type
Field
Description
`protected final LeafReader`
FilterLeafReader.`in`
The underlying LeafReader.
Fields in org.apache.lucene.index with type parameters of type LeafReader
Modifier and Type
Field
Description
`protected Comparator<LeafReader>`
LiveIndexWriterConfig.`leafSorter`
The comparator for sorting leaf readers.
Methods in org.apache.lucene.index that return LeafReader
Modifier and Type
Method
Description
`LeafReader`
FilterLeafReader.`getDelegate()`
Returns the wrapped `LeafReader`.
`LeafReader[]`
ParallelLeafReader.`getParallelReaders()`
Returns the `LeafReader`s that were passed on init.
`LeafReader`
LeafReaderContext.`reader()`
`static LeafReader`
FilterLeafReader.`unwrap(LeafReader reader)`
Get the wrapped instance by `reader` as long as this reader is an instance of `FilterLeafReader`.
`LeafReader`
ExitableDirectoryReader.ExitableSubReaderWrapper.`wrap(LeafReader reader)`
`protected LeafReader[]`
FilterDirectoryReader.SubReaderWrapper.`wrap(List<? extends LeafReader> readers)`
Wraps a list of LeafReaders
`abstract LeafReader`
FilterDirectoryReader.SubReaderWrapper.`wrap(LeafReader reader)`
Wrap one of the parent DirectoryReader's subreaders
Methods in org.apache.lucene.index that return types with arguments of type LeafReader
Modifier and Type
Method
Description
`Comparator<LeafReader>`
LiveIndexWriterConfig.`getLeafSorter()`
Returns a comparator for sorting leaf readers.
Methods in org.apache.lucene.index with parameters of type LeafReader
Modifier and Type
Method
Description
`static void`
ByteVectorValues.`checkField(LeafReader in, String field)`
Checks the Vector Encoding of a field
`static void`
FloatVectorValues.`checkField(LeafReader in, String field)`
Checks the Vector Encoding of a field
`NumericDocValues`
IndexSorter.NumericDocValuesProvider.`get(LeafReader reader)`
Returns the NumericDocValues instance for this LeafReader
`SortedDocValues`
IndexSorter.SortedDocValuesProvider.`get(LeafReader reader)`
Returns the SortedDocValues instance for this LeafReader
`static BinaryDocValues`
DocValues.`getBinary(LeafReader reader, String field)`
Returns BinaryDocValues for the field, or `DocValues.emptyBinary()` if it has none.
`IndexSorter.DocComparator`
IndexSorter.DoubleSorter.`getDocComparator(LeafReader reader, int maxDoc)`
`IndexSorter.DocComparator`
IndexSorter.FloatSorter.`getDocComparator(LeafReader reader, int maxDoc)`
`IndexSorter.DocComparator`
IndexSorter.`getDocComparator(LeafReader reader, int maxDoc)`
Get a comparator that determines the sort order of docs within a single Reader.
`IndexSorter.DocComparator`
IndexSorter.IntSorter.`getDocComparator(LeafReader reader, int maxDoc)`
`IndexSorter.DocComparator`
IndexSorter.LongSorter.`getDocComparator(LeafReader reader, int maxDoc)`
`IndexSorter.DocComparator`
IndexSorter.StringSorter.`getDocComparator(LeafReader reader, int maxDoc)`
`static NumericDocValues`
DocValues.`getNumeric(LeafReader reader, String field)`
Returns NumericDocValues for the field, or `DocValues.emptyNumeric()` if it has none.
`static SortedDocValues`
DocValues.`getSorted(LeafReader reader, String field)`
Returns SortedDocValues for the field, or `DocValues.emptySorted()` if it has none.
`static SortedNumericDocValues`
DocValues.`getSortedNumeric(LeafReader reader, String field)`
Returns SortedNumericDocValues for the field, or `DocValues.emptySortedNumeric()` if it has none.
`static SortedSetDocValues`
DocValues.`getSortedSet(LeafReader reader, String field)`
Returns SortedSetDocValues for the field, or `DocValues.emptySortedSet()` if it has none.
`static Terms`
Terms.`getTerms(LeafReader reader, String field)`
Returns the `Terms` index for this field, or `Terms.EMPTY` if it has none.
`static LeafReader`
FilterLeafReader.`unwrap(LeafReader reader)`
Get the wrapped instance by `reader` as long as this reader is an instance of `FilterLeafReader`.
`void`
IndexWriter.IndexReaderWarmer.`warm(LeafReader reader)`
Invoked on the `LeafReader` for the newly merged segment, before that segment is made visible to near-real-time readers.
`void`
SimpleMergedSegmentWarmer.`warm(LeafReader reader)`
`LeafReader`
ExitableDirectoryReader.ExitableSubReaderWrapper.`wrap(LeafReader reader)`
`abstract LeafReader`
FilterDirectoryReader.SubReaderWrapper.`wrap(LeafReader reader)`
Wrap one of the parent DirectoryReader's subreaders
`static CodecReader`
SlowCodecReaderWrapper.`wrap(LeafReader reader)`
Returns a `CodecReader` view of reader.
Method parameters in org.apache.lucene.index with type arguments of type LeafReader
Modifier and Type
Method
Description
`IndexSorter.ComparableProvider[]`
IndexSorter.DoubleSorter.`getComparableProviders(List<? extends LeafReader> readers)`
`IndexSorter.ComparableProvider[]`
IndexSorter.FloatSorter.`getComparableProviders(List<? extends LeafReader> readers)`
`IndexSorter.ComparableProvider[]`
IndexSorter.`getComparableProviders(List<? extends LeafReader> readers)`
Get an array of `IndexSorter.ComparableProvider`, one per segment, for merge sorting documents in different segments
`IndexSorter.ComparableProvider[]`
IndexSorter.IntSorter.`getComparableProviders(List<? extends LeafReader> readers)`
`IndexSorter.ComparableProvider[]`
IndexSorter.LongSorter.`getComparableProviders(List<? extends LeafReader> readers)`
`IndexSorter.ComparableProvider[]`
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 given `IndexCommit`.
`static DirectoryReader`
DirectoryReader.`open(Directory directory, Comparator<LeafReader> leafSorter)`
Returns a IndexReader for the index in the given Directory
`static DirectoryReader`
StandardDirectoryReader.`open(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Comparator<LeafReader> leafSorter)`
This constructor is only used for `StandardDirectoryReader.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 for `StandardDirectoryReader.doOpenIfChanged(SegmentInfos)`, as well as NRT replication.
`IndexWriterConfig`
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 LeafReaders
Constructors in org.apache.lucene.index with parameters of type LeafReader
Modifier
Constructor
Description
`protected`
`DirectoryReader(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter)`
Expert: Constructs a `DirectoryReader` on the given subReaders.
``
`ExitableFilterAtomicReader(LeafReader in, QueryTimeout queryTimeout)`
Constructor *
`protected`
`FilterLeafReader(LeafReader in)`
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 on `IndexReader.close()`.
Constructor parameters in org.apache.lucene.index with type arguments of type LeafReader
Modifier
Constructor
Description
`protected`
`DirectoryReader(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter)`
Expert: Constructs a `DirectoryReader` on the given subReaders.

## Uses of LeafReader in org.apache.lucene.search

Methods in org.apache.lucene.search with parameters of type LeafReader
Modifier and Type
Method
Description
`static DocIdSetIterator`
FieldExistsQuery.`getDocValuesDocIdSetIterator(String field, LeafReader reader)`
Returns a `DocIdSetIterator` 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.
Constructors in org.apache.lucene.search with parameters of type LeafReader
Modifier
Constructor
Description
``
`LeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, String field, boolean needsScores)`
Sole constructor: Score documents of `reader` with `scorer`.