Package org.apache.lucene.index
Class SegmentReadState
- java.lang.Object
-
- org.apache.lucene.index.SegmentReadState
-
public class SegmentReadState extends java.lang.Object
Holder class for common parameters used during read.
-
-
Field Summary
Fields Modifier and Type Field Description IOContext
context
IOContext
to pass toDirectory.openInput(String,IOContext)
.Directory
directory
Directory
where this segment is read from.FieldInfos
fieldInfos
FieldInfos
describing all fields in this segment.SegmentInfo
segmentInfo
SegmentInfo
describing this segment.java.lang.String
segmentSuffix
Unique suffix for any postings files read for this segment.int
termsIndexDivisor
ThetermInfosIndexDivisor
to use, if appropriate (not allPostingsFormat
s support it; in particular the current default does not).
-
Constructor Summary
Constructors Constructor Description SegmentReadState(SegmentReadState other, java.lang.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, java.lang.String segmentSuffix)
Create aSegmentReadState
.
-
-
-
Field Detail
-
segmentInfo
public final SegmentInfo segmentInfo
SegmentInfo
describing this segment.
-
fieldInfos
public final FieldInfos fieldInfos
FieldInfos
describing all fields in this segment.
-
context
public final IOContext context
IOContext
to pass toDirectory.openInput(String,IOContext)
.
-
termsIndexDivisor
public int termsIndexDivisor
ThetermInfosIndexDivisor
to use, if appropriate (not allPostingsFormat
s 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
public final java.lang.String segmentSuffix
Unique suffix for any postings files read 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)
).
-
-
Constructor Detail
-
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, java.lang.String segmentSuffix)
Create aSegmentReadState
.
-
SegmentReadState
public SegmentReadState(SegmentReadState other, java.lang.String newSegmentSuffix)
Create aSegmentReadState
.
-
-