Class SegmentReadState

java.lang.Object
org.apache.lucene.index.SegmentReadState

public class SegmentReadState extends Object
Holder class for common parameters used during read.
  • Field Details

    • directory

      public final Directory directory
      Directory where this segment is read from.
    • 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
    • termsIndexDivisor

      public int termsIndexDivisor
      The termInfosIndexDivisor to use, if appropriate (not all PostingsFormats 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 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 new PostingsFormat then any files you write/read must be derived using this suffix (use IndexFileNames.segmentFileName(String,String,String)).
  • Constructor Details