org.apache.lucene.index

## Class SlowCompositeReaderWrapper

- java.lang.Object
- - org.apache.lucene.index.IndexReader
  - - org.apache.lucene.index.LeafReader
    - - org.apache.lucene.index.SlowCompositeReaderWrapper

- All Implemented Interfaces:
    Closeable, AutoCloseable

  Deprecated.
  This will be removed in Lucene 7.0.

      @Deprecated
      public final class SlowCompositeReaderWrapper
      extends LeafReader

  This class forces a composite reader (eg a `MultiReader` or `DirectoryReader`) to emulate a `LeafReader`. This requires implementing the postings APIs on-the-fly, using the static methods in `MultiFields`, `MultiDocValues`, by stepping through the sub-readers to merge fields/terms, appending docs, etc.

  NOTE: this class almost always results in a performance hit. If this is important to your use case, you'll get better performance by gathering the sub readers using `IndexReader.getContext()` to get the leaves and then operate per-LeafReader, instead of using this class.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCoreClosedListener(LeafReader.CoreClosedListener listener)` Deprecated.
    `void` | `checkIntegrity()` Deprecated.
    `protected void` | `doClose()` Deprecated.
    `void` | `document(int docID, StoredFieldVisitor visitor)` Deprecated.
    `Fields` | `fields()` Deprecated.
    `BinaryDocValues` | `getBinaryDocValues(String field)` Deprecated.
    `Object` | `getCombinedCoreAndDeletesKey()` Deprecated.
    `Object` | `getCoreCacheKey()` Deprecated.
    `Bits` | `getDocsWithField(String field)` Deprecated.
    `FieldInfos` | `getFieldInfos()` Deprecated.
    `Sort` | `getIndexSort()` Deprecated.
    `Bits` | `getLiveDocs()` Deprecated.
    `NumericDocValues` | `getNormValues(String field)` Deprecated.
    `NumericDocValues` | `getNumericDocValues(String field)` Deprecated.
    `PointValues` | `getPointValues()` Deprecated.
    `SortedDocValues` | `getSortedDocValues(String field)` Deprecated.
    `SortedNumericDocValues` | `getSortedNumericDocValues(String field)` Deprecated.
    `SortedSetDocValues` | `getSortedSetDocValues(String field)` Deprecated.
    `Fields` | `getTermVectors(int docID)` Deprecated.
    `int` | `maxDoc()` Deprecated.
    `int` | `numDocs()` Deprecated.
    `void` | `removeCoreClosedListener(LeafReader.CoreClosedListener listener)` Deprecated.
    `String` | `toString()` Deprecated.
    `static LeafReader` | `wrap(IndexReader reader)` Deprecated. This method is sugar for getting an `LeafReader` from an `IndexReader` of any kind.

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

- - ### Method Detail

    - #### wrap

          public static LeafReader wrap(IndexReader reader)
                                 throws IOException

      Deprecated.
      This method is sugar for getting an `LeafReader` from an `IndexReader` of any kind. If the reader is already atomic, it is returned unchanged, otherwise wrapped by this class.
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Deprecated.
      Overrides:
        `toString` in class `Object`

    - #### addCoreClosedListener

          public void addCoreClosedListener(LeafReader.CoreClosedListener listener)

      Deprecated.
      Specified by:
        `addCoreClosedListener` in class `LeafReader`

    - #### removeCoreClosedListener

          public void removeCoreClosedListener(LeafReader.CoreClosedListener listener)

      Deprecated.
      Specified by:
        `removeCoreClosedListener` in class `LeafReader`

    - #### fields

          public Fields fields()

      Deprecated.
      Specified by:
        `fields` in class `LeafReader`

    - #### getNumericDocValues

          public NumericDocValues getNumericDocValues(String field)
                                               throws IOException

      Deprecated.
      Specified by:
        `getNumericDocValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getDocsWithField

          public Bits getDocsWithField(String field)
                                throws IOException

      Deprecated.
      Specified by:
        `getDocsWithField` in class `LeafReader`
      Throws:
        `IOException`

    - #### getBinaryDocValues

          public BinaryDocValues getBinaryDocValues(String field)
                                             throws IOException

      Deprecated.
      Specified by:
        `getBinaryDocValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getSortedNumericDocValues

          public SortedNumericDocValues getSortedNumericDocValues(String field)
                                                           throws IOException

      Deprecated.
      Specified by:
        `getSortedNumericDocValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getSortedDocValues

          public SortedDocValues getSortedDocValues(String field)
                                             throws IOException

      Deprecated.
      Specified by:
        `getSortedDocValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getSortedSetDocValues

          public SortedSetDocValues getSortedSetDocValues(String field)
                                                   throws IOException

      Deprecated.
      Specified by:
        `getSortedSetDocValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getNormValues

          public NumericDocValues getNormValues(String field)
                                         throws IOException

      Deprecated.
      Specified by:
        `getNormValues` in class `LeafReader`
      Throws:
        `IOException`

    - #### getTermVectors

          public Fields getTermVectors(int docID)
                                throws IOException

      Deprecated.
      Specified by:
        `getTermVectors` in class `IndexReader`
      Throws:
        `IOException`

    - #### numDocs

          public int numDocs()

      Deprecated.
      Specified by:
        `numDocs` in class `IndexReader`

    - #### maxDoc

          public int maxDoc()

      Deprecated.
      Specified by:
        `maxDoc` in class `IndexReader`

    - #### document

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

      Deprecated.
      Specified by:
        `document` in class `IndexReader`
      Throws:
        `IOException`

    - #### getLiveDocs

          public Bits getLiveDocs()

      Deprecated.
      Specified by:
        `getLiveDocs` in class `LeafReader`

    - #### getPointValues

          public PointValues getPointValues()

      Deprecated.
      Specified by:
        `getPointValues` in class `LeafReader`

    - #### getFieldInfos

          public FieldInfos getFieldInfos()

      Deprecated.
      Specified by:
        `getFieldInfos` in class `LeafReader`

    - #### getCoreCacheKey

          public Object getCoreCacheKey()

      Deprecated.
      Overrides:
        `getCoreCacheKey` in class `IndexReader`

    - #### getCombinedCoreAndDeletesKey

          public Object getCombinedCoreAndDeletesKey()

      Deprecated.
      Overrides:
        `getCombinedCoreAndDeletesKey` in class `IndexReader`

    - #### doClose

          protected void doClose()
                          throws IOException

      Deprecated.
      Specified by:
        `doClose` in class `IndexReader`
      Throws:
        `IOException`

    - #### checkIntegrity

          public void checkIntegrity()
                              throws IOException

      Deprecated.
      Specified by:
        `checkIntegrity` in class `LeafReader`
      Throws:
        `IOException`

    - #### getIndexSort

          public Sort getIndexSort()

      Deprecated.
      Specified by:
        `getIndexSort` in class `LeafReader`

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