Package org.apache.lucene.index
Class SegmentReadState
java.lang.Object
org.apache.lucene.index.SegmentReadState
Holder class for common parameters used during read.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
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. -
Constructor Summary
ConstructorsConstructorDescriptionSegmentReadState(SegmentReadState other, String newSegmentSuffix) Create aSegmentReadState.SegmentReadState(SegmentReadState other, IOContext context) Create aSegmentReadStatewith a newIOContext.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context) Create aSegmentReadState.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, String segmentSuffix) Create aSegmentReadState. -
Method Summary
Modifier and TypeMethodDescriptionwithHints(IOContext.FileOpenHint... hints) Returns a copy of this state whose context carries the given hints in place of its own.
-
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). -
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
Create aSegmentReadState. -
SegmentReadState
public SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, String segmentSuffix) Create aSegmentReadState. -
SegmentReadState
Create aSegmentReadStatewith a newIOContext. -
SegmentReadState
Create aSegmentReadState.
-
-
Method Details
-
withHints
Returns a copy of this state whose context carries the given hints in place of its own.
-