Package org.apache.lucene.codecs

# Class TermVectorsReader

java.lang.Object
org.apache.lucene.index.TermVectors
org.apache.lucene.codecs.TermVectorsReader

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

Direct Known Subclasses:
  `Lucene90CompressingTermVectorsReader`

public abstract class TermVectorsReader extends TermVectors implements Cloneable, Closeable
Codec API for reading term vectors:

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

## Field Summary

### Fields inherited from class org.apache.lucene.index.TermVectors

`EMPTY`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`TermVectorsReader()`
Sole constructor.

## Method Summary

Modifier and Type
Method
Description
`abstract void`
`checkIntegrity()`
Checks consistency of this reader.
`abstract TermVectorsReader`
`clone()`
Create a clone that one caller at a time may use to read term vectors.
`TermVectorsReader`
`getMergeInstance()`
Returns an instance optimized for merging.

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

`get, get, prefetch`

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

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

### Methods inherited from interface java.io.Closeable

`close`

## Constructor Details

### TermVectorsReader

protected TermVectorsReader()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

## Method Details

### checkIntegrity

public abstract void checkIntegrity() throws IOException
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.

Throws:
  `IOException`
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

### clone

public abstract TermVectorsReader clone()
Create a clone that one caller at a time may use to read term vectors.

Overrides:
  `clone` in class `Object`

### getMergeInstance

public TermVectorsReader getMergeInstance()
Returns an instance optimized for merging. This instance may only be consumed in the thread that called `getMergeInstance()`.

The default implementation returns `this`