Package org.apache.lucene.search.uhighlight

## Class OverlaySingleDocTermsLeafReader

- java.lang.Object
- - org.apache.lucene.index.IndexReader
  - - org.apache.lucene.index.LeafReader
    - - org.apache.lucene.index.FilterLeafReader
      - - org.apache.lucene.search.uhighlight.OverlaySingleDocTermsLeafReader

- All Implemented Interfaces:
    `Closeable`, `AutoCloseable`

      public class OverlaySingleDocTermsLeafReader
      extends FilterLeafReader

  Overlays a 2nd LeafReader for the terms of one field, otherwise the primary reader is consulted. The 2nd reader is assumed to have one document of 0 and we remap it to a target doc ID.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### 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 | Description
    --- | ---
    `OverlaySingleDocTermsLeafReader​(LeafReader in, LeafReader in2, String in2Field, int in2TargetDocId)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `IndexReader.CacheHelper` | `getCoreCacheHelper()` |
    `IndexReader.CacheHelper` | `getReaderCacheHelper()` |
    `Terms` | `terms​(String field)` |

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

      `checkIntegrity, doClose, document, getBinaryDocValues, getDelegate, getFieldInfos, getLiveDocs, getMetaData, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, getVectorValues, maxDoc, numDocs, searchNearestVectors, 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, notifyReaderClosedListeners, numDeletedDocs, registerParentReader, tryIncRef`

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

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

- - ### Constructor Detail

    - #### OverlaySingleDocTermsLeafReader

          public OverlaySingleDocTermsLeafReader​(LeafReader in,
                                                 LeafReader in2,
                                                 String in2Field,
                                                 int in2TargetDocId)

  - ### Method Detail

    - #### terms

          public Terms terms​(String field)
                      throws IOException

      Overrides:
        `terms` 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`