Package org.apache.lucene.index
Class SegmentReadState
java.lang.Object
org.apache.lucene.index.SegmentReadState
Holder class for common parameters used during read.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal IOContextIOContextto pass toDirectory.openInput(String,IOContext).final DirectoryDirectorywhere this segment is read from.final FieldInfosFieldInfosdescribing all fields in this segment.final SegmentInfoSegmentInfodescribing this segment.final StringUnique suffix for any postings files read for this segment.intThetermInfosIndexDivisorto use, if appropriate (not allPostingsFormats support it; in particular the current default does not). -
Constructor Summary
ConstructorsConstructorDescriptionSegmentReadState(SegmentReadState other, String newSegmentSuffix) Create aSegmentReadState.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor) Create aSegmentReadState.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor, String segmentSuffix) Create aSegmentReadState. -
Method Summary
-
Field Details
-
directory
Directorywhere this segment is read from. -
segmentInfo
SegmentInfodescribing this segment. -
fieldInfos
FieldInfosdescribing all fields in this segment. -
context
IOContextto pass toDirectory.openInput(String,IOContext). -
termsIndexDivisor
public int termsIndexDivisorThetermInfosIndexDivisorto use, if appropriate (not allPostingsFormats support it; in particular the current default does not).NOTE: if this is < 0, that means "defer terms index load until needed". But if the codec must load the terms index on init (preflex is the only once currently that must do so), then it should negate this value to get the app's terms divisor
-
segmentSuffix
Unique suffix for any postings files read 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)).
-
-
Constructor Details
-
SegmentReadState
public SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor) Create aSegmentReadState. -
SegmentReadState
public SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor, String segmentSuffix) Create aSegmentReadState. -
SegmentReadState
Create aSegmentReadState.
-