Uses of Class
org.apache.lucene.index.IndexReader
Package
Description
Code to maintain and access indices.
Code to search indices.
-
Uses of IndexReader in org.apache.lucene.index
Modifier and TypeClassDescriptionclass
BaseCompositeReader<R extends IndexReader>
Base class for implementingCompositeReader
s based on an array of sub-readers.Modifier and TypeClassDescriptionclass
BaseCompositeReader<R extends IndexReader>
Base class for implementingCompositeReader
s based on an array of sub-readers.class
LeafReader implemented by codec APIs.class
Instances of this reader type can only be used to get stored fields from the underlying LeafReaders, but it is not possible to directly retrieve postings.class
DirectoryReader is an implementation ofCompositeReader
that can read indexes in aDirectory
.class
TheExitableDirectoryReader
wraps a real indexDirectoryReader
and allows for aQueryTimeout
implementation object to be checked periodically to see if the thread should exit or not.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
A FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.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
LeafReader
is an abstract class, providing an interface for accessing an index.class
ACompositeReader
which reads multiple indexes, appending their content.class
AnCompositeReader
which reads multiple, parallel indexes.class
AnLeafReader
which reads multiple, parallel indexes.final class
IndexReader implementation over a single segment.final class
This reader filters out documents that have a doc values value in the given field and treat these documents as soft deleted.final class
AnCodecReader
which supports sorting documents by a givenSort
.final class
Default implementation ofDirectoryReader
.Modifier and TypeMethodDescriptionabstract IndexReader
IndexReaderContext.reader()
Returns theIndexReader
, this context represents.Modifier and TypeMethodDescriptionprotected abstract List<? extends IndexReader>
CompositeReader.getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of.Modifier and TypeMethodDescriptionstatic BinaryDocValues
MultiDocValues.getBinaryValues
(IndexReader r, String field) Returns a BinaryDocValues for a reader's docvalues (potentially merging on-the-fly)static int
PointValues.getDocCount
(IndexReader reader, String field) Return the cumulated number of docs that have points across all leaves of the givenIndexReader
.static Collection<String>
FieldInfos.getIndexedFields
(IndexReader reader) Returns a set of names of fields that have a terms index.static Bits
MultiBits.getLiveDocs
(IndexReader reader) Returns a singleBits
instance for this reader, merging live Documents on the fly.static byte[]
PointValues.getMaxPackedValue
(IndexReader reader, String field) Return the maximum packed values across all leaves of the givenIndexReader
.static FieldInfos
FieldInfos.getMergedFieldInfos
(IndexReader reader) Call this to get the (merged) FieldInfos for a composite reader.static byte[]
PointValues.getMinPackedValue
(IndexReader reader, String field) Return the minimum packed values across all leaves of the givenIndexReader
.static NumericDocValues
MultiDocValues.getNormValues
(IndexReader r, String field) Returns a NumericDocValues for a reader's norms (potentially merging on-the-fly).static NumericDocValues
MultiDocValues.getNumericValues
(IndexReader r, String field) Returns a NumericDocValues for a reader's docvalues (potentially merging on-the-fly)static SortedNumericDocValues
MultiDocValues.getSortedNumericValues
(IndexReader r, String field) Returns a SortedNumericDocValues for a reader's docvalues (potentially merging on-the-fly)static SortedSetDocValues
MultiDocValues.getSortedSetValues
(IndexReader r, String field) Returns a SortedSetDocValues for a reader's docvalues (potentially doing extremely slow things).static SortedDocValues
MultiDocValues.getSortedValues
(IndexReader r, String field) Returns a SortedDocValues for a reader's docvalues (potentially doing extremely slow things).static PostingsEnum
MultiTerms.getTermPostingsEnum
(IndexReader r, String field, BytesRef term) ReturnsPostingsEnum
for the specified field and term.static PostingsEnum
MultiTerms.getTermPostingsEnum
(IndexReader r, String field, BytesRef term, int flags) ReturnsPostingsEnum
for the specified field and term, with control over whether freqs, positions, offsets or payloads are required.static Terms
MultiTerms.getTerms
(IndexReader r, String field) This method may return null if the field does not exist or if it has no terms.final void
IndexReader.registerParentReader
(IndexReader reader) Expert: This method is called byIndexReader
s which wrap other readers (e.g.static long
PointValues.size
(IndexReader reader, String field) Return the cumulated number of points across all leaves of the givenIndexReader
.long
IndexWriter.tryDeleteDocument
(IndexReader readerIn, int docID) Expert: attempts to delete by document ID, as long as the provided reader is a near-real-time reader (fromDirectoryReader.open(IndexWriter)
).long
IndexWriter.tryUpdateDocValue
(IndexReader readerIn, int docID, Field... fields) Expert: attempts to update doc values by document ID, as long as the provided reader is a near-real-time reader (fromDirectoryReader.open(IndexWriter)
).ModifierConstructorDescriptionprotected
BaseCompositeReader
(R[] subReaders, Comparator<R> subReadersSorter) Constructs aBaseCompositeReader
on the given subReaders.MultiReader
(IndexReader... subReaders) Construct a MultiReader aggregating the named set of (sub)readers.MultiReader
(IndexReader[] subReaders, boolean closeSubReaders) Construct a MultiReader aggregating the named set of (sub)readers.MultiReader
(IndexReader[] subReaders, Comparator<IndexReader> subReadersSorter, boolean closeSubReaders) Construct a MultiReader aggregating the named set of (sub)readers.ModifierConstructorDescriptionMultiReader
(IndexReader[] subReaders, Comparator<IndexReader> subReadersSorter, boolean closeSubReaders) Construct a MultiReader aggregating the named set of (sub)readers. -
Uses of IndexReader in org.apache.lucene.search
Modifier and TypeMethodDescriptionIndexSearcher.getIndexReader()
Return theIndexReader
this searches.Modifier and TypeMethodDescriptionstatic IndexSearcher
SearcherManager.getSearcher
(SearcherFactory searcherFactory, IndexReader reader, IndexReader previousReader) Expert: creates a searcher from the providedIndexReader
using the providedSearcherFactory
.SearcherFactory.newSearcher
(IndexReader reader, IndexReader previousReader) Returns a new IndexSearcher over the given reader.final Query
BlendedTermQuery.rewrite
(IndexReader reader) BooleanQuery.rewrite
(IndexReader reader) BoostQuery.rewrite
(IndexReader reader) ConstantScoreQuery.rewrite
(IndexReader reader) DisjunctionMaxQuery.rewrite
(IndexReader reader) Optimize our representation and our subqueries representationsDocValuesFieldExistsQuery.rewrite
(IndexReader reader) DocValuesRewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) IndexOrDocValuesQuery.rewrite
(IndexReader reader) KnnVectorQuery.rewrite
(IndexReader reader) MultiPhraseQuery.rewrite
(IndexReader reader) final Query
MultiTermQuery.rewrite
(IndexReader reader) To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource)
.abstract Query
MultiTermQuery.RewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) NGramPhraseQuery.rewrite
(IndexReader reader) PhraseQuery.rewrite
(IndexReader reader) Query.rewrite
(IndexReader reader) Expert: called to re-write queries into primitive queries.final Query
ScoringRewrite.rewrite
(IndexReader reader, MultiTermQuery query) SynonymQuery.rewrite
(IndexReader reader) TermInSetQuery.rewrite
(IndexReader reader) final Query
TopTermsRewrite.rewrite
(IndexReader reader, MultiTermQuery query) ModifierConstructorDescriptionCreates a searcher searching the provided index.IndexSearcher
(IndexReader r, Executor executor) Runs searches for each segment separately, using the provided Executor.