org.apache.lucene.index

## Class MismatchedLeafReader

- java.lang.Object
- - org.apache.lucene.index.IndexReader
  - - org.apache.lucene.index.LeafReader
    - - org.apache.lucene.index.FilterLeafReader
      - - org.apache.lucene.index.MismatchedLeafReader

All Implemented Interfaces:
  Closeable, AutoCloseable

    public class MismatchedLeafReader
    extends FilterLeafReader

Shuffles field numbers around to try to trip bugs where field numbers are assumed to always be consistent across segments.

### Nested Class Summary

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

`FilterLeafReader.FilterFields, FilterLeafReader.FilterPostingsEnum, FilterLeafReader.FilterTerms, FilterLeafReader.FilterTermsEnum`

### 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.FilterLeafReader

`in`

### Constructor Summary

Constructors
Constructor and Description
`MismatchedLeafReader(LeafReader in, Random random)` Creates a new reader which will renumber fields in `in`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `document(int docID, StoredFieldVisitor visitor)`
`IndexReader.CacheHelper` `getCoreCacheHelper()`
`FieldInfos` `getFieldInfos()`
`IndexReader.CacheHelper` `getReaderCacheHelper()`

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

`checkIntegrity, doClose, getBinaryDocValues, getDelegate, getLiveDocs, getMetaData, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, maxDoc, numDocs, terms, toString, unwrap`

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

`docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreq`

### 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

#### MismatchedLeafReader

    public MismatchedLeafReader(LeafReader in,
                                Random random)

Creates a new reader which will renumber fields in `in`

### Method Detail

#### getFieldInfos

    public FieldInfos getFieldInfos()

Overrides:
  `getFieldInfos` in class `FilterLeafReader`

#### document

    public void document(int docID,
                         StoredFieldVisitor visitor)
                  throws IOException

Overrides:
  `document` in class `FilterLeafReader`
Throws:
  `IOException`

#### getCoreCacheHelper

    public IndexReader.CacheHelper getCoreCacheHelper()

Specified by:
  `getCoreCacheHelper` in class `LeafReader`

#### getReaderCacheHelper

    public IndexReader.CacheHelper getReaderCacheHelper()

Specified by:
  `getReaderCacheHelper` in class `IndexReader`