org.apache.lucene.codecs.lucene40

## Class Lucene40SegmentInfoFormat

- java.lang.Object
- - org.apache.lucene.codecs.SegmentInfoFormat
  - - org.apache.lucene.codecs.lucene40.Lucene40SegmentInfoFormat

-     public class Lucene40SegmentInfoFormat
      extends SegmentInfoFormat

  Lucene 4.0 Segment info format.

  Files:

  - `.si`: Header, SegVersion, SegSize, IsCompoundFile, Diagnostics, Attributes, Files
  Data types:

  - Header --> `CodecHeader`
  - SegSize --> `Int32`
  - SegVersion --> `String`
  - Files --> `Set<String>`
  - Diagnostics, Attributes --> `Map<String,String>`
  - IsCompoundFile --> `Int8`
  Field Descriptions:

  - SegVersion is the code version that created 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.
  - Checksum contains the CRC32 checksum of all bytes in the segments_N file up until the checksum. This is used to verify integrity of the file on opening the index.
  - 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.
  - Attributes: a key-value map of codec-private attributes.
  - Files is a list of files referred to by this segment.
  See Also:
    `SegmentInfos`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SI_EXTENSION` File extension used to store `SegmentInfo`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Lucene40SegmentInfoFormat()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SegmentInfoReader` | `getSegmentInfoReader()` Returns the `SegmentInfoReader` for reading `SegmentInfo` instances.
    `SegmentInfoWriter` | `getSegmentInfoWriter()` Returns the `SegmentInfoWriter` for writing `SegmentInfo` instances.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SI_EXTENSION

          public static final String SI_EXTENSION

      File extension used to store `SegmentInfo`.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Lucene40SegmentInfoFormat

          public Lucene40SegmentInfoFormat()

      Sole constructor.

  - ### Method Detail

    - #### getSegmentInfoReader

          public SegmentInfoReader getSegmentInfoReader()

      Description copied from class: `SegmentInfoFormat`
      Returns the `SegmentInfoReader` for reading `SegmentInfo` instances.
      Specified by:
        `getSegmentInfoReader` in class `SegmentInfoFormat`

    - #### getSegmentInfoWriter

          public SegmentInfoWriter getSegmentInfoWriter()

      Description copied from class: `SegmentInfoFormat`
      Returns the `SegmentInfoWriter` for writing `SegmentInfo` instances.
      Specified by:
        `getSegmentInfoWriter` in class `SegmentInfoFormat`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.