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.LeafReader

      `LeafReader.CoreClosedListener`

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

      `IndexReader.ReaderClosedListener`

  - ### 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
    Modifier and Type | Method and Description
    --- | ---
    `void` | `document(int docID, StoredFieldVisitor visitor)`
    `FieldInfos` | `getFieldInfos()`

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

      `addCoreClosedListener, checkIntegrity, doClose, fields, getBinaryDocValues, getDelegate, getDocsWithField, getIndexSort, getLiveDocs, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, maxDoc, numDocs, removeCoreClosedListener, toString, unwrap`

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

      `addCoreClosedListenerAsReaderClosedListener, docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, removeCoreClosedListenerAsReaderClosedListener, terms, totalTermFreq`

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

      `addReaderClosedListener, close, decRef, document, document, ensureOpen, equals, getCombinedCoreAndDeletesKey, getCoreCacheKey, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, removeReaderClosedListener, 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`

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