Package org.apache.lucene.index
Class SegmentWriteState
- java.lang.Object
 - 
- org.apache.lucene.index.SegmentWriteState
 
 
- 
public class SegmentWriteState extends java.lang.ObjectHolder class for common parameters used during write. 
- 
- 
Field Summary
Fields Modifier and Type Field Description IOContextcontextIOContextfor all writes; you should pass this toDirectory.createOutput(String,IOContext).intdelCountOnFlushNumber of deleted documents set while flushing the segment.DirectorydirectoryDirectorywhere this segment will be written to.FieldInfosfieldInfosFieldInfosdescribing all fields in this segment.InfoStreaminfoStreamInfoStreamused for debugging messages.MutableBitsliveDocsMutableBitsrecording live documents; this is only set if there is one or more deleted documents.SegmentInfosegmentInfoSegmentInfodescribing this segment.java.lang.StringsegmentSuffixUnique suffix for any postings files written for this segment.org.apache.lucene.index.BufferedUpdatessegUpdatesDeletes and updates to apply while we are flushing the segment.inttermIndexIntervalExpert: The fraction of terms in the "dictionary" which should be stored in RAM. 
- 
Constructor Summary
Constructors Constructor Description SegmentWriteState(SegmentWriteState state, java.lang.String segmentSuffix)Create a shallow copy ofSegmentWriteStatewith a new segment suffix.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context)Sole constructor.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, java.lang.String segmentSuffix)Constructor which takes segment suffix. 
 - 
 
- 
- 
Field Detail
- 
infoStream
public final InfoStream infoStream
InfoStreamused for debugging messages. 
- 
segmentInfo
public final SegmentInfo segmentInfo
SegmentInfodescribing this segment. 
- 
fieldInfos
public final FieldInfos fieldInfos
FieldInfosdescribing all fields in this segment. 
- 
delCountOnFlush
public int delCountOnFlush
Number of 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 MutableBits liveDocs
MutableBitsrecording live documents; this is only set if there is one or more deleted documents. 
- 
segmentSuffix
public final java.lang.String segmentSuffix
Unique suffix for any postings files written for this segment.PerFieldPostingsFormatsets this for each of the postings formats it wraps. If you create a newPostingsFormatthen any files you write/read must be derived using this suffix (useIndexFileNames.segmentFileName(String,String,String)). 
- 
termIndexInterval
public 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. 
- 
context
public final IOContext context
IOContextfor all writes; you should pass this toDirectory.createOutput(String,IOContext). 
 - 
 
- 
Constructor Detail
- 
SegmentWriteState
public SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context)
Sole constructor. 
- 
SegmentWriteState
public SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, java.lang.String segmentSuffix)
Constructor which takes segment suffix. 
- 
SegmentWriteState
public SegmentWriteState(SegmentWriteState state, java.lang.String segmentSuffix)
Create a shallow copy ofSegmentWriteStatewith a new segment suffix. 
 - 
 
 -