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 classBaseCompositeReader<R extends IndexReader>Base class for implementingCompositeReaders based on an array of sub-readers.Subclasses of IndexReader in org.apache.lucene.index Modifier and Type Class Description classAtomicReaderAtomicReaderis an abstract class, providing an interface for accessing an index.classBaseCompositeReader<R extends IndexReader>Base class for implementingCompositeReaders based on an array of sub-readers.classCompositeReaderInstances 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.classDirectoryReaderDirectoryReader is an implementation ofCompositeReaderthat can read indexes in aDirectory.classFilterAtomicReaderAFilterAtomicReadercontains another AtomicReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.classFilterDirectoryReaderA FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.classMultiReaderACompositeReaderwhich reads multiple indexes, appending their content.classParallelAtomicReaderAnAtomicReaderwhich reads multiple, parallel indexes.classParallelCompositeReaderAnCompositeReaderwhich reads multiple, parallel indexes.classSegmentReaderIndexReader implementation over a single segment.classSlowCompositeReaderWrapperThis class forces a composite reader (eg aMultiReaderorDirectoryReader) to emulate an atomic reader.Methods in org.apache.lucene.index that return IndexReader Modifier and Type Method Description abstract IndexReaderIndexReaderContext. 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 voidIndexWriter. addIndexes(IndexReader... readers)Merges the provided indexes into this index.longTrackingIndexWriter. addIndexes(IndexReader... readers)CallsIndexWriter.addIndexes(IndexReader...)and returns the generation that reflects this change.static BinaryDocValuesMultiDocValues. getBinaryValues(IndexReader r, String field)Returns a BinaryDocValues for a reader's docvalues (potentially merging on-the-fly)static BitsMultiDocValues. getDocsWithField(IndexReader r, String field)Returns a Bits for a reader's docsWithField (potentially merging on-the-fly)static FieldsMultiFields. getFields(IndexReader reader)Returns a singleFieldsinstance 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 BitsMultiFields. getLiveDocs(IndexReader reader)Returns a singleBitsinstance for this reader, merging live Documents on the fly.static FieldInfosMultiFields. getMergedFieldInfos(IndexReader reader)Call this to get the (merged) FieldInfos for a composite reader.static NumericDocValuesMultiDocValues. getNormValues(IndexReader r, String field)Returns a NumericDocValues for a reader's norms (potentially merging on-the-fly).static NumericDocValuesMultiDocValues. getNumericValues(IndexReader r, String field)Returns a NumericDocValues for a reader's docvalues (potentially merging on-the-fly)static SortedSetDocValuesMultiDocValues. getSortedSetValues(IndexReader r, String field)Returns a SortedSetDocValues for a reader's docvalues (potentially doing extremely slow things).static SortedDocValuesMultiDocValues. getSortedValues(IndexReader r, String field)Returns a SortedDocValues for a reader's docvalues (potentially doing extremely slow things).static DocsEnumMultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)ReturnsDocsEnumfor the specified field & term.static DocsEnumMultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)ReturnsDocsEnumfor the specified field & term, with control over whether freqs are required.static DocsAndPositionsEnumMultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)ReturnsDocsAndPositionsEnumfor the specified field & term.static DocsAndPositionsEnumMultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)ReturnsDocsAndPositionsEnumfor the specified field & term, with control over whether offsets and payloads are required.static TermsMultiFields. getTerms(IndexReader r, String field)This method may return null if the field does not exist.voidIndexReader.ReaderClosedListener. onClose(IndexReader reader)Invoked when theIndexReaderis closed.voidIndexReader. registerParentReader(IndexReader reader)Expert: This method is called byIndexReaders which wrap other readers (e.g.booleanIndexWriter. 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)).longTrackingIndexWriter. tryDeleteDocument(IndexReader reader, int docID)CalsIndexWriter.tryDeleteDocument(IndexReader,int)and returns the generation that reflects this change.static AtomicReaderSlowCompositeReaderWrapper. wrap(IndexReader reader)This method is sugar for getting anAtomicReaderfrom anIndexReaderof any kind.Constructors in org.apache.lucene.index with parameters of type IndexReader Constructor Description BaseCompositeReader(R[] subReaders)Constructs aBaseCompositeReaderon 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 IndexReaderIndexSearcher. getIndexReader()Return theIndexReaderthis searches.Methods in org.apache.lucene.search with parameters of type IndexReader Modifier and Type Method Description static IndexSearcherSearcherManager. getSearcher(SearcherFactory searcherFactory, IndexReader reader)Expert: creates a searcher from the providedIndexReaderusing the providedSearcherFactory.IndexSearcherSearcherFactory. newSearcher(IndexReader reader)Returns a new IndexSearcher over the given reader.QueryBooleanQuery. rewrite(IndexReader reader)QueryConstantScoreQuery. rewrite(IndexReader reader)QueryDisjunctionMaxQuery. rewrite(IndexReader reader)Optimize our representation and our subqueries representationsQueryDocTermOrdsRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryFieldCacheRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryFilteredQuery. rewrite(IndexReader reader)Rewrites the query.QueryMultiPhraseQuery. rewrite(IndexReader reader)QueryMultiTermQuery. rewrite(IndexReader reader)To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource).abstract QueryMultiTermQuery.RewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryNGramPhraseQuery. rewrite(IndexReader reader)QueryPhraseQuery. rewrite(IndexReader reader)QueryQuery. rewrite(IndexReader reader)Expert: called to re-write queries into primitive queries.QScoringRewrite. rewrite(IndexReader reader, MultiTermQuery query)QTopTermsRewrite. 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 QueryFieldMaskingSpanQuery. rewrite(IndexReader reader)QuerySpanMultiTermQueryWrapper. rewrite(IndexReader reader)abstract SpanQuerySpanMultiTermQueryWrapper.SpanRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)SpanQuerySpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite. rewrite(IndexReader reader, MultiTermQuery query)QuerySpanNearQuery. rewrite(IndexReader reader)QuerySpanNotQuery. rewrite(IndexReader reader)QuerySpanOrQuery. rewrite(IndexReader reader)QuerySpanPositionCheckQuery. rewrite(IndexReader reader)
-