org.apache.lucene.index

## Class MergingDirectoryReaderWrapper

- java.lang.Object
- - org.apache.lucene.index.IndexReader
  - - org.apache.lucene.index.CompositeReader
    - - org.apache.lucene.index.BaseCompositeReader<LeafReader>
      - - org.apache.lucene.index.DirectoryReader
        - - org.apache.lucene.index.FilterDirectoryReader
          - - org.apache.lucene.index.MergingDirectoryReaderWrapper

All Implemented Interfaces:
  Closeable, AutoCloseable

    public final class MergingDirectoryReaderWrapper
    extends FilterDirectoryReader

`DirectoryReader` wrapper that uses the merge instances of the wrapped `CodecReader`s. NOTE: This class will fail to work if the leaves of the wrapped directory are not codec readers.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.lucene.index.FilterDirectoryReader

`FilterDirectoryReader.SubReaderWrapper`

### Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader

`IndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListener`

### Field Summary

### Fields inherited from class org.apache.lucene.index.FilterDirectoryReader

`in`

### Fields inherited from class org.apache.lucene.index.DirectoryReader

`directory`

### Constructor Summary

Constructors
Constructor and Description
`MergingDirectoryReaderWrapper(DirectoryReader in)` Wrap the given directory.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected DirectoryReader` `doWrapDirectoryReader(DirectoryReader in)`
`IndexReader.CacheHelper` `getReaderCacheHelper()`

### Methods inherited from class org.apache.lucene.index.FilterDirectoryReader

`doClose, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, getDelegate, getIndexCommit, getVersion, isCurrent, unwrap`

### Methods inherited from class org.apache.lucene.index.DirectoryReader

`directory, indexExists, listCommits, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged`

### Methods inherited from class org.apache.lucene.index.BaseCompositeReader

`docFreq, document, getDocCount, getSequentialSubReaders, getSumDocFreq, getSumTotalTermFreq, getTermVectors, maxDoc, numDocs, readerBase, readerIndex, totalTermFreq`

### Methods inherited from class org.apache.lucene.index.CompositeReader

`getContext, toString`

### Methods inherited from class org.apache.lucene.index.IndexReader

`close, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, tryIncRef`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MergingDirectoryReaderWrapper

    public MergingDirectoryReaderWrapper(DirectoryReader in)
                                  throws IOException

Wrap the given directory.

Throws:
  `IOException`

### Method Detail

#### doWrapDirectoryReader

    protected DirectoryReader doWrapDirectoryReader(DirectoryReader in)
                                             throws IOException

Specified by:
  `doWrapDirectoryReader` in class `FilterDirectoryReader`
Throws:
  `IOException`

#### getReaderCacheHelper

    public IndexReader.CacheHelper getReaderCacheHelper()

Specified by:
  `getReaderCacheHelper` in class `IndexReader`