## org.apache.lucene.index
Class SegmentWriteState

    java.lang.Object
      org.apache.lucene.index.SegmentWriteState

    public class SegmentWriteState

extends Object

Holder class for common parameters used during write.

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

Field Summary
`BitVector` `deletedDocs`
`Directory` `directory`
`FieldInfos` `fieldInfos`
`boolean` `hasVectors`
`PrintStream` `infoStream`
`int` `maxSkipLevels` Expert: The maximum number of skip levels.
`int` `numDocs`
`org.apache.lucene.index.BufferedDeletes` `segDeletes`
`String` `segmentName`
`int` `skipInterval` Expert: The fraction of TermDocs entries stored in skip tables, used to accelerate `TermDocs.skipTo(int)`.
`int` `termIndexInterval` Expert: The fraction of terms in the "dictionary" which should be stored in RAM.

Constructor Summary
`SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)`

Method Summary

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### infoStream

    public final PrintStream infoStream

### directory

    public final Directory directory

### segmentName

    public final String segmentName

### fieldInfos

    public final FieldInfos fieldInfos

### numDocs

    public final int numDocs

### hasVectors

    public boolean hasVectors

### segDeletes

    public final org.apache.lucene.index.BufferedDeletes segDeletes

### deletedDocs

    public BitVector deletedDocs

### termIndexInterval

    public final int termIndexInterval

  Expert: The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.

### skipInterval

    public final int skipInterval

  Expert: The fraction of TermDocs entries stored in skip tables, used to accelerate `TermDocs.skipTo(int)`. Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.

  See Also:
    Constant Field Values

### maxSkipLevels

    public final int maxSkipLevels

  Expert: The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.

  See Also:
    Constant Field Values

Constructor Detail

### SegmentWriteState

    public SegmentWriteState(PrintStream infoStream,
                             Directory directory,
                             String segmentName,
                             FieldInfos fieldInfos,
                             int numDocs,
                             int termIndexInterval,
                             org.apache.lucene.index.BufferedDeletes segDeletes)