Class 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 Details

    • infoStream

      public final InfoStream infoStream
      InfoStream used for debugging messages.
    • directory

      public final Directory directory
      Directory where this segment will be written to.
    • segmentInfo

      public final SegmentInfo segmentInfo
      SegmentInfo describing this segment.
    • fieldInfos

      public final FieldInfos fieldInfos
      FieldInfos describing all fields in this segment.
    • delCountOnFlush

      public int delCountOnFlush
      Number of deleted documents set while flushing the segment.
    • softDelCountOnFlush

      public int softDelCountOnFlush
      Number of only soft deleted documents set while flushing the segment.
    • segUpdates

      public final org.apache.lucene.index.BufferedUpdates segUpdates
      Deletes and updates to apply while we are flushing the segment. A Term is enrolled in here if it was deleted/updated at one point, and it's mapped to the docIDUpto, meaning any docID < docIDUpto containing this term should be deleted/updated.
    • liveDocs

      public FixedBitSet liveDocs
      FixedBitSet recording live documents; this is only set if there is one or more deleted documents.
    • segmentSuffix

      public final String segmentSuffix
      Unique suffix for any postings files written for this segment. PerFieldPostingsFormat sets this for each of the postings formats it wraps. If you create a new PostingsFormat then any files you write/read must be derived using this suffix (use IndexFileNames.segmentFileName(String,String,String)).

      Note: the suffix must be either empty, or be a textual suffix contain exactly two parts (separated by underscore), or be a base36 generation.

    • context

      public final IOContext context
      IOContext for all writes; you should pass this to Directory.createOutput(String,IOContext).
  • Constructor Details