## Uses of Class
org.apache.lucene.index.DirectoryReader

- Packages that use DirectoryReader
  Package | Description
  --- | ---
  org.apache.lucene.index | Code to maintain and access indices.
  org.apache.lucene.search | Code to search indices.

- - ### Uses of DirectoryReader in org.apache.lucene.index

    Subclasses of DirectoryReader in org.apache.lucene.index
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ExitableDirectoryReader` The `ExitableDirectoryReader` wraps a real index `DirectoryReader` and allows for a `QueryTimeout` implementation object to be checked periodically to see if the thread should exit or not.
    `class` | `FilterDirectoryReader` A FilterDirectoryReader wraps another DirectoryReader, allowing implementations to transform or extend it.
    `class` | `SoftDeletesDirectoryReaderWrapper` This reader filters out documents that have a doc values value in the given field and treat these documents as soft deleted.
    `class` | `StandardDirectoryReader` Default implementation of `DirectoryReader`.

    Fields in org.apache.lucene.index declared as DirectoryReader
    Modifier and Type | Field and Description
    --- | ---
    `protected DirectoryReader` | FilterDirectoryReader.`in` The filtered DirectoryReader

    Methods in org.apache.lucene.index that return DirectoryReader
    Modifier and Type | Method and Description
    --- | ---
    `protected DirectoryReader` | FilterDirectoryReader.`doOpenIfChanged()`
    `protected abstract DirectoryReader` | DirectoryReader.`doOpenIfChanged()` Implement this method to support `openIfChanged(DirectoryReader)`.
    `protected DirectoryReader` | StandardDirectoryReader.`doOpenIfChanged()`
    `protected DirectoryReader` | FilterDirectoryReader.`doOpenIfChanged(IndexCommit commit)`
    `protected abstract DirectoryReader` | DirectoryReader.`doOpenIfChanged(IndexCommit commit)` Implement this method to support `openIfChanged(DirectoryReader,IndexCommit)`.
    `protected DirectoryReader` | StandardDirectoryReader.`doOpenIfChanged(IndexCommit commit)`
    `protected DirectoryReader` | FilterDirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
    `protected abstract DirectoryReader` | DirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)` Implement this method to support `openIfChanged(DirectoryReader,IndexWriter,boolean)`.
    `protected DirectoryReader` | StandardDirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
    `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 DirectoryReader` | ExitableDirectoryReader.`doWrapDirectoryReader(DirectoryReader in)`
    `DirectoryReader` | FilterDirectoryReader.`getDelegate()` Returns the wrapped `DirectoryReader`.
    `static DirectoryReader` | DirectoryReader.`open(Directory directory)` Returns a IndexReader reading the index in the given Directory
    `static DirectoryReader` | DirectoryReader.`open(Directory directory, Map<String,String> readerAttributes)` Returns a IndexReader reading the index in the given Directory
    `static DirectoryReader` | StandardDirectoryReader.`open(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Map<String,String> readerAttributes)` This constructor is only used for `StandardDirectoryReader.doOpenIfChanged(SegmentInfos)`, as well as NRT replication.
    `static DirectoryReader` | DirectoryReader.`open(IndexCommit commit)` Expert: returns an IndexReader reading the index in the given `IndexCommit`.
    `static DirectoryReader` | DirectoryReader.`open(IndexCommit commit, Map<String,String> readerAttributes)` Expert: returns an IndexReader reading the index in the given `IndexCommit`.
    `static DirectoryReader` | DirectoryReader.`open(IndexWriter writer)` Open a near real time IndexReader from the `IndexWriter`.
    `static DirectoryReader` | DirectoryReader.`open(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes)` Expert: open a near real time IndexReader from the `IndexWriter`, controlling whether past deletions should be applied.
    `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 the `IndexWriter` 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 by `reader` as long as this reader is an instance of `FilterDirectoryReader`.
    `static DirectoryReader` | ExitableDirectoryReader.`wrap(DirectoryReader in, QueryTimeout queryTimeout)` Wraps a provided DirectoryReader.

    Methods in org.apache.lucene.index with parameters of type DirectoryReader
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | ReaderManager.`decRef(DirectoryReader reference)`
    `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 DirectoryReader` | ExitableDirectoryReader.`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 the `IndexWriter` 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 by `reader` as long as this reader is an instance of `FilterDirectoryReader`.
    `static DirectoryReader` | ExitableDirectoryReader.`wrap(DirectoryReader in, QueryTimeout queryTimeout)` Wraps a provided DirectoryReader.

    Constructors in org.apache.lucene.index with parameters of type DirectoryReader
    Constructor and Description
    `ExitableDirectoryReader(DirectoryReader in, QueryTimeout queryTimeout)` Constructor
    `FilterDirectoryReader(DirectoryReader in, FilterDirectoryReader.SubReaderWrapper wrapper)` Create 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-opened `DirectoryReader`, stealing the incoming reference.
    `SoftDeletesDirectoryReaderWrapper(DirectoryReader in, String field)` Creates a new soft deletes wrapper.

  - ### Uses of DirectoryReader in org.apache.lucene.search

    Constructors in org.apache.lucene.search with parameters of type DirectoryReader
    Constructor and Description
    `SearcherManager(DirectoryReader reader, SearcherFactory searcherFactory)` Creates and returns a new SearcherManager from an existing `DirectoryReader`.

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.