Uses of Class
org.apache.lucene.index.DirectoryReader
Packages that use DirectoryReader
Package
Description
Code to maintain and access indices.
Internal bridges to package-private internals, for use by the lucene test framework only.
Code to search indices.
-
Uses of DirectoryReader in org.apache.lucene.index
Subclasses of DirectoryReader in org.apache.lucene.indexModifier and TypeClassDescriptionclassTheExitableDirectoryReaderwraps a real indexDirectoryReaderand allows for aQueryTimeoutimplementation object to be checked periodically to see if the thread should exit or not.classA FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.final classThis reader filters out documents that have a doc values value in the given field and treat these documents as soft deleted.final classDefault implementation ofDirectoryReader.Fields in org.apache.lucene.index declared as DirectoryReaderModifier and TypeFieldDescriptionprotected final DirectoryReaderFilterDirectoryReader.inThe filtered DirectoryReaderMethods in org.apache.lucene.index that return DirectoryReaderModifier and TypeMethodDescriptionprotected abstract DirectoryReaderDirectoryReader.doOpenIfChanged()Implement this method to supportopenIfChanged(DirectoryReader).protected abstract DirectoryReaderDirectoryReader.doOpenIfChanged(IndexCommit commit) Implement this method to supportopenIfChanged(DirectoryReader,IndexCommit).protected abstract DirectoryReaderDirectoryReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) Implement this method to supportopenIfChanged(DirectoryReader,IndexWriter,boolean).protected final DirectoryReaderFilterDirectoryReader.doOpenIfChanged()protected final DirectoryReaderFilterDirectoryReader.doOpenIfChanged(IndexCommit commit) protected final DirectoryReaderFilterDirectoryReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) protected DirectoryReaderStandardDirectoryReader.doOpenIfChanged()protected DirectoryReaderStandardDirectoryReader.doOpenIfChanged(IndexCommit commit) protected DirectoryReaderStandardDirectoryReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) protected DirectoryReaderExitableDirectoryReader.doWrapDirectoryReader(DirectoryReader in) protected abstract DirectoryReaderFilterDirectoryReader.doWrapDirectoryReader(DirectoryReader in) Called by the doOpenIfChanged() methods to return a new wrapped DirectoryReader.protected DirectoryReaderSoftDeletesDirectoryReaderWrapper.doWrapDirectoryReader(DirectoryReader in) FilterDirectoryReader.getDelegate()Returns the wrappedDirectoryReader.static DirectoryReaderDirectoryReader.open(IndexCommit commit) Expert: returns an IndexReader reading the index in the givenIndexCommit.static DirectoryReaderDirectoryReader.open(IndexCommit commit, int minSupportedMajorVersion, Comparator<LeafReader> leafSorter) Expert: returns an IndexReader reading the index on the givenIndexCommit.static DirectoryReaderDirectoryReader.open(IndexWriter writer) Open a near real time IndexReader from theIndexWriter.static DirectoryReaderDirectoryReader.open(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes) Expert: open a near real time IndexReader from theIndexWriter, controlling whether past deletions should be applied.static DirectoryReaderReturns a IndexReader reading the index in the given Directorystatic DirectoryReaderDirectoryReader.open(Directory directory, Comparator<LeafReader> leafSorter) Returns a IndexReader for the index in the given Directorystatic DirectoryReaderStandardDirectoryReader.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 DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader) If the index has changed since the provided reader was opened, open and return a new reader; else, return null.static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexCommit commit) If the IndexCommit differs from what the provided reader is searching, open and return a new reader; else, return null.static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexWriter writer) Expert: If there changes (committed or not) in theIndexWriterversus what the provided reader is searching, then open and return a new IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexWriter writer, boolean applyAllDeletes) Expert: Opens a new reader, if there are any changes, controlling whether past deletions should be applied.protected DirectoryReaderReaderManager.refreshIfNeeded(DirectoryReader referenceToRefresh) static DirectoryReaderFilterDirectoryReader.unwrap(DirectoryReader reader) Get the wrapped instance byreaderas long as this reader is an instance ofFilterDirectoryReader.static DirectoryReaderExitableDirectoryReader.wrap(DirectoryReader in, QueryTimeout queryTimeout) Wraps a provided DirectoryReader.Methods in org.apache.lucene.index with parameters of type DirectoryReaderModifier and TypeMethodDescriptionprotected voidReaderManager.decRef(DirectoryReader reference) protected DirectoryReaderExitableDirectoryReader.doWrapDirectoryReader(DirectoryReader in) protected abstract DirectoryReaderFilterDirectoryReader.doWrapDirectoryReader(DirectoryReader in) Called by the doOpenIfChanged() methods to return a new wrapped DirectoryReader.protected DirectoryReaderSoftDeletesDirectoryReaderWrapper.doWrapDirectoryReader(DirectoryReader in) protected intReaderManager.getRefCount(DirectoryReader reference) static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader) If the index has changed since the provided reader was opened, open and return a new reader; else, return null.static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexCommit commit) If the IndexCommit differs from what the provided reader is searching, open and return a new reader; else, return null.static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexWriter writer) Expert: If there changes (committed or not) in theIndexWriterversus what the provided reader is searching, then open and return a new IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).static DirectoryReaderDirectoryReader.openIfChanged(DirectoryReader oldReader, IndexWriter writer, boolean applyAllDeletes) Expert: Opens a new reader, if there are any changes, controlling whether past deletions should be applied.protected DirectoryReaderReaderManager.refreshIfNeeded(DirectoryReader referenceToRefresh) protected booleanReaderManager.tryIncRef(DirectoryReader reference) static DirectoryReaderFilterDirectoryReader.unwrap(DirectoryReader reader) Get the wrapped instance byreaderas long as this reader is an instance ofFilterDirectoryReader.static DirectoryReaderExitableDirectoryReader.wrap(DirectoryReader in, QueryTimeout queryTimeout) Wraps a provided DirectoryReader.Constructors in org.apache.lucene.index with parameters of type DirectoryReaderModifierConstructorDescriptionExitableDirectoryReader(DirectoryReader in, QueryTimeout queryTimeout) ConstructorCreate a new FilterDirectoryReader that filters a passed in DirectoryReader, using the supplied SubReaderWrapper to wrap its subreader.ReaderManager(DirectoryReader reader) Creates and returns a new ReaderManager from the given already-openedDirectoryReader, stealing the incoming reference.Creates a new soft deletes wrapper. -
Uses of DirectoryReader in org.apache.lucene.internal.tests
Methods in org.apache.lucene.internal.tests that return DirectoryReaderModifier and TypeMethodDescriptionIndexWriterAccess.getReader(IndexWriter iw, boolean applyDeletions, boolean writeAllDeletes) -
Uses of DirectoryReader in org.apache.lucene.search
Constructors in org.apache.lucene.search with parameters of type DirectoryReaderModifierConstructorDescriptionSearcherManager(DirectoryReader reader, SearcherFactory searcherFactory) Creates and returns a new SearcherManager from an existingDirectoryReader.