Class Lucene46SegmentInfoFormat
- java.lang.Object
-
- org.apache.lucene.codecs.SegmentInfoFormat
-
- org.apache.lucene.codecs.lucene46.Lucene46SegmentInfoFormat
-
public class Lucene46SegmentInfoFormat extends SegmentInfoFormat
Lucene 4.6 Segment info format.Files:
- .si: Header, SegVersion, SegSize, IsCompoundFile, Diagnostics, Files
- Header -->
CodecHeader - SegSize -->
Int32 - SegVersion -->
String - Files -->
Set<String> - Diagnostics -->
Map<String,String> - IsCompoundFile -->
Int8
- 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. - Files is a list of files referred to by this segment.
- See Also:
SegmentInfos
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSI_EXTENSIONFile extension used to storeSegmentInfo.
-
Constructor Summary
Constructors Constructor Description Lucene46SegmentInfoFormat()Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentInfoReadergetSegmentInfoReader()Returns theSegmentInfoReaderfor readingSegmentInfoinstances.SegmentInfoWritergetSegmentInfoWriter()Returns theSegmentInfoWriterfor writingSegmentInfoinstances.
-
-
-
Field Detail
-
SI_EXTENSION
public static final java.lang.String SI_EXTENSION
File extension used to storeSegmentInfo.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSegmentInfoReader
public SegmentInfoReader getSegmentInfoReader()
Description copied from class:SegmentInfoFormatReturns theSegmentInfoReaderfor readingSegmentInfoinstances.- Specified by:
getSegmentInfoReaderin classSegmentInfoFormat
-
getSegmentInfoWriter
public SegmentInfoWriter getSegmentInfoWriter()
Description copied from class:SegmentInfoFormatReturns theSegmentInfoWriterfor writingSegmentInfoinstances.- Specified by:
getSegmentInfoWriterin classSegmentInfoFormat
-
-