Uses of Class
org.apache.lucene.index.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
Modifier and TypeClassDescriptionclass
TheExitableDirectoryReader
wraps a real indexDirectoryReader
and allows for aQueryTimeout
implementation object to be checked periodically to see if the thread should exit or not.class
A FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.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
Default implementation ofDirectoryReader
.Modifier and TypeFieldDescriptionprotected final DirectoryReader
FilterDirectoryReader.in
The filtered DirectoryReaderModifier and TypeMethodDescriptionprotected abstract DirectoryReader
DirectoryReader.doOpenIfChanged()
Implement this method to supportopenIfChanged(DirectoryReader)
.protected abstract DirectoryReader
DirectoryReader.doOpenIfChanged
(IndexCommit commit) Implement this method to supportopenIfChanged(DirectoryReader,IndexCommit)
.protected abstract DirectoryReader
DirectoryReader.doOpenIfChanged
(IndexWriter writer, boolean applyAllDeletes) Implement this method to supportopenIfChanged(DirectoryReader,IndexWriter,boolean)
.protected final DirectoryReader
FilterDirectoryReader.doOpenIfChanged()
protected final DirectoryReader
FilterDirectoryReader.doOpenIfChanged
(IndexCommit commit) protected final DirectoryReader
FilterDirectoryReader.doOpenIfChanged
(IndexWriter writer, boolean applyAllDeletes) protected DirectoryReader
StandardDirectoryReader.doOpenIfChanged()
protected DirectoryReader
StandardDirectoryReader.doOpenIfChanged
(IndexCommit commit) protected DirectoryReader
StandardDirectoryReader.doOpenIfChanged
(IndexWriter writer, boolean applyAllDeletes) protected DirectoryReader
ExitableDirectoryReader.doWrapDirectoryReader
(DirectoryReader in) protected abstract DirectoryReader
FilterDirectoryReader.doWrapDirectoryReader
(DirectoryReader in) Called by the doOpenIfChanged() methods to return a new wrapped DirectoryReader.protected DirectoryReader
SoftDeletesDirectoryReaderWrapper.doWrapDirectoryReader
(DirectoryReader in) FilterDirectoryReader.getDelegate()
Returns the wrappedDirectoryReader
.static DirectoryReader
DirectoryReader.open
(IndexCommit commit) Expert: returns an IndexReader reading the index in the givenIndexCommit
.static DirectoryReader
DirectoryReader.open
(IndexCommit commit, int minSupportedMajorVersion, Comparator<LeafReader> leafSorter) Expert: returns an IndexReader reading the index on the givenIndexCommit
.static DirectoryReader
DirectoryReader.open
(IndexWriter writer) Open a near real time IndexReader from theIndexWriter
.static DirectoryReader
DirectoryReader.open
(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes) Expert: open a near real time IndexReader from theIndexWriter
, controlling whether past deletions should be applied.static DirectoryReader
Returns a IndexReader reading the index in the given Directorystatic DirectoryReader
DirectoryReader.open
(Directory directory, Comparator<LeafReader> leafSorter) Returns a IndexReader for the the index in the given Directorystatic DirectoryReader
StandardDirectoryReader.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 DirectoryReader
DirectoryReader.openIfChanged
(DirectoryReader oldReader) If the index has changed since the provided reader was opened, open and return a new reader; else, return null.static DirectoryReader
DirectoryReader.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 DirectoryReader
DirectoryReader.openIfChanged
(DirectoryReader oldReader, IndexWriter writer) Expert: If there changes (committed or not) in theIndexWriter
versus 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 DirectoryReader
DirectoryReader.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 DirectoryReader
ReaderManager.refreshIfNeeded
(DirectoryReader referenceToRefresh) static DirectoryReader
FilterDirectoryReader.unwrap
(DirectoryReader reader) Get the wrapped instance byreader
as long as this reader is an instance ofFilterDirectoryReader
.static DirectoryReader
ExitableDirectoryReader.wrap
(DirectoryReader in, QueryTimeout queryTimeout) Wraps a provided DirectoryReader.Modifier and TypeMethodDescriptionprotected void
ReaderManager.decRef
(DirectoryReader reference) protected DirectoryReader
ExitableDirectoryReader.doWrapDirectoryReader
(DirectoryReader in) protected abstract DirectoryReader
FilterDirectoryReader.doWrapDirectoryReader
(DirectoryReader in) Called by the doOpenIfChanged() methods to return a new wrapped DirectoryReader.protected DirectoryReader
SoftDeletesDirectoryReaderWrapper.doWrapDirectoryReader
(DirectoryReader in) protected int
ReaderManager.getRefCount
(DirectoryReader reference) static DirectoryReader
DirectoryReader.openIfChanged
(DirectoryReader oldReader) If the index has changed since the provided reader was opened, open and return a new reader; else, return null.static DirectoryReader
DirectoryReader.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 DirectoryReader
DirectoryReader.openIfChanged
(DirectoryReader oldReader, IndexWriter writer) Expert: If there changes (committed or not) in theIndexWriter
versus 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 DirectoryReader
DirectoryReader.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 DirectoryReader
ReaderManager.refreshIfNeeded
(DirectoryReader referenceToRefresh) protected boolean
ReaderManager.tryIncRef
(DirectoryReader reference) static DirectoryReader
FilterDirectoryReader.unwrap
(DirectoryReader reader) Get the wrapped instance byreader
as long as this reader is an instance ofFilterDirectoryReader
.static DirectoryReader
ExitableDirectoryReader.wrap
(DirectoryReader in, QueryTimeout queryTimeout) Wraps a provided DirectoryReader.ModifierConstructorDescriptionExitableDirectoryReader
(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
Modifier and TypeMethodDescriptionIndexWriterAccess.getReader
(IndexWriter iw, boolean applyDeletions, boolean writeAllDeletes) -
Uses of DirectoryReader in org.apache.lucene.search
ModifierConstructorDescriptionSearcherManager
(DirectoryReader reader, SearcherFactory searcherFactory) Creates and returns a new SearcherManager from an existingDirectoryReader
.