org.apache.lucene.codecs.compressing

## Class CompressingTermVectorsReader

- java.lang.Object
- - org.apache.lucene.codecs.TermVectorsReader
  - - org.apache.lucene.codecs.compressing.CompressingTermVectorsReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, Cloneable, Accountable

      public final class CompressingTermVectorsReader
      extends TermVectorsReader
      implements Closeable

  `TermVectorsReader` for `CompressingTermVectorsFormat`.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkIntegrity()` Checks consistency of this reader.
    `TermVectorsReader` | `clone()` Create a clone that one caller at a time may use to read term vectors.
    `void` | `close()`
    `Fields` | `get(int doc)` Returns term vectors for this document, or null if term vectors were not indexed.
    `Collection<Accountable>` | `getChildResources()` Returns nested resources of this class.
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.lucene.codecs.TermVectorsReader

      `getMergeInstance`

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CompressingTermVectorsReader

          public CompressingTermVectorsReader(Directory d,
                                              SegmentInfo si,
                                              String segmentSuffix,
                                              FieldInfos fn,
                                              IOContext context,
                                              String formatName,
                                              CompressionMode compressionMode)
                                       throws IOException

      Sole constructor.
      Throws:
        `IOException`

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### clone

          public TermVectorsReader clone()

      Description copied from class: `TermVectorsReader`
      Create a clone that one caller at a time may use to read term vectors.
      Specified by:
        `clone` in class `TermVectorsReader`

    - #### get

          public Fields get(int doc)
                     throws IOException

      Description copied from class: `TermVectorsReader`
      Returns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in an `OffsetAttribute` available from the `PostingsEnum`.
      Specified by:
        `get` in class `TermVectorsReader`
      Throws:
        `IOException`

    - #### ramBytesUsed

          public long ramBytesUsed()

      Description copied from interface: `Accountable`
      Return the memory usage of this object in bytes. Negative values are illegal.
      Specified by:
        `ramBytesUsed` in interface `Accountable`

    - #### getChildResources

          public Collection<Accountable> getChildResources()

      Description copied from interface: `Accountable`
      Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
      Specified by:
        `getChildResources` in interface `Accountable`
      See Also:
        `Accountables`

    - #### checkIntegrity

          public void checkIntegrity()
                              throws IOException

      Description copied from class: `TermVectorsReader`
      Checks consistency of this reader.

      Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.

      Specified by:
        `checkIntegrity` in class `TermVectorsReader`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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