org.apache.lucene.codecs.blockterms

## Class BlockTermsWriter

- java.lang.Object
- - org.apache.lucene.codecs.FieldsConsumer
  - - org.apache.lucene.codecs.blockterms.BlockTermsWriter

All Implemented Interfaces:
  Closeable, AutoCloseable

    public class BlockTermsWriter
    extends FieldsConsumer

Writes terms dict, block-encoding (column stride) each term's metadata for each set of terms between two index terms.

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

### Field Summary

Fields
`protected IndexOutput` `out`
`static int` `VERSION_APPEND_ONLY`
`static int` `VERSION_CURRENT`
`static int` `VERSION_START`

### Constructor Summary

Constructors
Constructor and Description
`BlockTermsWriter(TermsIndexWriterBase termsIndexWriter, SegmentWriteState state, PostingsWriterBase postingsWriter)`

### Method Summary

Methods
`TermsConsumer` `addField(FieldInfo field)`
`void` `close()`

### Methods inherited from class org.apache.lucene.codecs.FieldsConsumer

`merge`

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

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

### Field Detail

#### VERSION_START

    public static final int VERSION_START

See Also:
  Constant Field Values

#### VERSION_APPEND_ONLY

    public static final int VERSION_APPEND_ONLY

See Also:
  Constant Field Values

#### VERSION_CURRENT

    public static final int VERSION_CURRENT

See Also:
  Constant Field Values

#### out

    protected final IndexOutput out

### Constructor Detail

#### BlockTermsWriter

    public BlockTermsWriter(TermsIndexWriterBase termsIndexWriter,
                    SegmentWriteState state,
                    PostingsWriterBase postingsWriter)
                     throws IOException

Throws:
  `IOException`

### Method Detail

#### addField

    public TermsConsumer addField(FieldInfo field)
                           throws IOException

Specified by:
  `addField` in class `FieldsConsumer`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

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