Package org.apache.lucene.index
Class SegmentWriteState
java.lang.Object
org.apache.lucene.index.SegmentWriteState
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
FieldsModifier and TypeFieldDescriptionfinal IOContext
IOContext
for all writes; you should pass this toDirectory.createOutput(String,IOContext)
.int
Number of deleted documents set while flushing the segment.final Directory
Directory
where this segment will be written to.final FieldInfos
FieldInfos
describing all fields in this segment.final InfoStream
InfoStream
used for debugging messages.FixedBitSet
recording live documents; this is only set if there is one or more deleted documents.final SegmentInfo
SegmentInfo
describing this segment.final String
Unique suffix for any postings files written for this segment.final org.apache.lucene.index.BufferedUpdates
Deletes and updates to apply while we are flushing the segment.int
Number of only soft deleted documents set while flushing the segment. -
Constructor Summary
ConstructorsConstructorDescriptionSegmentWriteState
(SegmentWriteState state, String segmentSuffix) Create a shallow copy ofSegmentWriteState
with a new segment suffix.SegmentWriteState
(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context) Sole constructor.SegmentWriteState
(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, String segmentSuffix) Constructor which takes segment suffix. -
Method Summary
-
Field Details
-
infoStream
InfoStream
used for debugging messages. -
directory
Directory
where this segment will be written to. -
segmentInfo
SegmentInfo
describing this segment. -
fieldInfos
FieldInfos
describing all fields in this segment. -
delCountOnFlush
public int delCountOnFlushNumber of deleted documents set while flushing the segment. -
softDelCountOnFlush
public int softDelCountOnFlushNumber of only soft deleted documents set while flushing the segment. -
segUpdates
public final org.apache.lucene.index.BufferedUpdates segUpdatesDeletes 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
FixedBitSet
recording live documents; this is only set if there is one or more deleted documents. -
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 newPostingsFormat
then any files you write/read must be derived using this suffix (useIndexFileNames.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
IOContext
for all writes; you should pass this toDirectory.createOutput(String,IOContext)
.
-
-
Constructor Details
-
SegmentWriteState
public SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context) Sole constructor. -
SegmentWriteState
public SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, String segmentSuffix) Constructor which takes segment suffix. -
SegmentWriteState
Create a shallow copy ofSegmentWriteState
with a new segment suffix.
-