Uses of Class
org.apache.lucene.index.IndexReader
-
Packages that use IndexReader Package Description org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.search Code to search indices.org.apache.lucene.search.spans The calculus of spans. -
-
Uses of IndexReader in org.apache.lucene.index
Classes in org.apache.lucene.index with type parameters of type IndexReader Modifier and Type Class Description class
BaseCompositeReader<R extends IndexReader>
Base class for implementingCompositeReader
s based on an array of sub-readers.Subclasses of IndexReader in org.apache.lucene.index Modifier and Type Class Description class
AtomicReader
AtomicReader
is an abstract class, providing an interface for accessing an index.class
BaseCompositeReader<R extends IndexReader>
Base class for implementingCompositeReader
s based on an array of sub-readers.class
CompositeReader
Instances of this reader type can only be used to get stored fields from the underlying AtomicReaders, but it is not possible to directly retrieve postings.class
DirectoryReader
DirectoryReader is an implementation ofCompositeReader
that can read indexes in aDirectory
.class
FilterAtomicReader
AFilterAtomicReader
contains another AtomicReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.class
FilterDirectoryReader
A FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.class
MultiReader
ACompositeReader
which reads multiple indexes, appending their content.class
ParallelAtomicReader
AnAtomicReader
which reads multiple, parallel indexes.class
ParallelCompositeReader
AnCompositeReader
which reads multiple, parallel indexes.class
SegmentReader
IndexReader implementation over a single segment.class
SlowCompositeReaderWrapper
This class forces a composite reader (eg aMultiReader
orDirectoryReader
) to emulate an atomic reader.Methods in org.apache.lucene.index that return IndexReader Modifier and Type Method Description abstract IndexReader
IndexReaderContext. reader()
Returns theIndexReader
, this context represents.Methods in org.apache.lucene.index that return types with arguments of type IndexReader Modifier and Type Method Description protected abstract List<? extends IndexReader>
CompositeReader. getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of.Methods in org.apache.lucene.index with parameters of type IndexReader Modifier and Type Method Description void
IndexWriter. addIndexes(IndexReader... readers)
Merges the provided indexes into this index.long
TrackingIndexWriter. addIndexes(IndexReader... readers)
CallsIndexWriter.addIndexes(IndexReader...)
and returns the generation that reflects this change.static BinaryDocValues
MultiDocValues. getBinaryValues(IndexReader r, String field)
Returns a BinaryDocValues for a reader's docvalues (potentially merging on-the-fly)static Bits
MultiDocValues. getDocsWithField(IndexReader r, String field)
Returns a Bits for a reader's docsWithField (potentially merging on-the-fly)static Fields
MultiFields. getFields(IndexReader reader)
Returns a singleFields
instance for this reader, merging fields/terms/docs/positions on the fly.static Collection<String>
MultiFields. getIndexedFields(IndexReader reader)
Call this to get the (merged) FieldInfos representing the set of indexed fields only for a composite reader.static Bits
MultiFields. getLiveDocs(IndexReader reader)
Returns a singleBits
instance for this reader, merging live Documents on the fly.static FieldInfos
MultiFields. getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a composite reader.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 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 DocsEnum
MultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)
ReturnsDocsEnum
for the specified field & term.static DocsEnum
MultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)
ReturnsDocsEnum
for the specified field & term, with control over whether freqs are required.static DocsAndPositionsEnum
MultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)
ReturnsDocsAndPositionsEnum
for the specified field & term.static DocsAndPositionsEnum
MultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)
ReturnsDocsAndPositionsEnum
for the specified field & term, with control over whether offsets and payloads are required.static Terms
MultiFields. getTerms(IndexReader r, String field)
This method may return null if the field does not exist.void
IndexReader.ReaderClosedListener. onClose(IndexReader reader)
Invoked when theIndexReader
is closed.void
IndexReader. registerParentReader(IndexReader reader)
Expert: This method is called byIndexReader
s which wrap other readers (e.g.boolean
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,boolean)
).long
TrackingIndexWriter. tryDeleteDocument(IndexReader reader, int docID)
CalsIndexWriter.tryDeleteDocument(IndexReader,int)
and returns the generation that reflects this change.static AtomicReader
SlowCompositeReaderWrapper. wrap(IndexReader reader)
This method is sugar for getting anAtomicReader
from anIndexReader
of any kind.Constructors in org.apache.lucene.index with parameters of type IndexReader Constructor Description BaseCompositeReader(R[] subReaders)
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. -
Uses of IndexReader in org.apache.lucene.search
Methods in org.apache.lucene.search that return IndexReader Modifier and Type Method Description IndexReader
IndexSearcher. getIndexReader()
Return theIndexReader
this searches.Methods in org.apache.lucene.search with parameters of type IndexReader Modifier and Type Method Description static IndexSearcher
SearcherManager. getSearcher(SearcherFactory searcherFactory, IndexReader reader)
Expert: creates a searcher from the providedIndexReader
using the providedSearcherFactory
.IndexSearcher
SearcherFactory. newSearcher(IndexReader reader)
Returns a new IndexSearcher over the given reader.Query
BooleanQuery. rewrite(IndexReader reader)
Query
ConstantScoreQuery. rewrite(IndexReader reader)
Query
DisjunctionMaxQuery. rewrite(IndexReader reader)
Optimize our representation and our subqueries representationsQuery
DocTermOrdsRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)
Query
FieldCacheRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)
Query
FilteredQuery. rewrite(IndexReader reader)
Rewrites the query.Query
MultiPhraseQuery. rewrite(IndexReader reader)
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)
Query
NGramPhraseQuery. rewrite(IndexReader reader)
Query
PhraseQuery. rewrite(IndexReader reader)
Query
Query. rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.Q
ScoringRewrite. rewrite(IndexReader reader, MultiTermQuery query)
Q
TopTermsRewrite. rewrite(IndexReader reader, MultiTermQuery query)
Constructors in org.apache.lucene.search with parameters of type IndexReader Constructor Description IndexSearcher(IndexReader r)
Creates a searcher searching the provided index.IndexSearcher(IndexReader r, ExecutorService executor)
Runs searches for each segment separately, using the provided ExecutorService. -
Uses of IndexReader in org.apache.lucene.search.spans
Methods in org.apache.lucene.search.spans with parameters of type IndexReader Modifier and Type Method Description Query
FieldMaskingSpanQuery. rewrite(IndexReader reader)
Query
SpanMultiTermQueryWrapper. rewrite(IndexReader reader)
abstract SpanQuery
SpanMultiTermQueryWrapper.SpanRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)
SpanQuery
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite. rewrite(IndexReader reader, MultiTermQuery query)
Query
SpanNearQuery. rewrite(IndexReader reader)
Query
SpanNotQuery. rewrite(IndexReader reader)
Query
SpanOrQuery. rewrite(IndexReader reader)
Query
SpanPositionCheckQuery. rewrite(IndexReader reader)
-