Class Lucene70SegmentInfoFormat


  • public class Lucene70SegmentInfoFormat
    extends SegmentInfoFormat
    Lucene 7.0 Segment info format.

    Files:

    • .si: Header, SegVersion, SegSize, IsCompoundFile, Diagnostics, Files, Attributes, IndexSort, Footer
    Data types: Field Descriptions:
    • SegVersion is the code version that created the segment.
    • SegMinVersion is the minimum code version that contributed documents to the segment.
    • SegSize is the number of documents contained in the segment index.
    • IsCompoundFile records whether the segment is written as a compound file or not. If this is -1, the segment is not a compound file. If it is 1, the segment is a compound file.
    • The Diagnostics Map is privately written by IndexWriter, as a debugging aid, for each segment it creates. It includes metadata like the current Lucene version, OS, Java version, why the segment was created (merge, flush, addIndexes), etc.
    • Files is a list of files referred to by this segment.
    See Also:
    SegmentInfos
    • Constructor Detail

      • Lucene70SegmentInfoFormat

        public Lucene70SegmentInfoFormat()
        Sole constructor.
    • Method Detail

      • read

        public SegmentInfo read​(Directory dir,
                                java.lang.String segment,
                                byte[] segmentID,
                                IOContext context)
                         throws java.io.IOException
        Description copied from class: SegmentInfoFormat
        Read SegmentInfo data from a directory.
        Specified by:
        read in class SegmentInfoFormat
        Parameters:
        dir - directory to read from
        segment - name of the segment to read
        segmentID - expected identifier for the segment
        Returns:
        infos instance to be populated with data
        Throws:
        java.io.IOException - If an I/O error occurs
      • parseSegmentInfo

        private SegmentInfo parseSegmentInfo​(Directory dir,
                                             DataInput input,
                                             java.lang.String segment,
                                             byte[] segmentID)
                                      throws java.io.IOException
        Throws:
        java.io.IOException