Class Lucene99SegmentInfoFormat
- java.lang.Object
-
- org.apache.lucene.codecs.SegmentInfoFormat
-
- org.apache.lucene.codecs.lucene99.Lucene99SegmentInfoFormat
-
public class Lucene99SegmentInfoFormat extends SegmentInfoFormat
Lucene 9.9 Segment info format.Files:
.si: Header, SegVersion, SegSize, IsCompoundFile, Diagnostics, Files, Attributes, IndexSort, Footer
- Header -->
IndexHeader - SegSize -->
Int32 - SegVersion -->
String - SegMinVersion -->
String - Files -->
Set<String> - Diagnostics,Attributes -->
Map<String,String> - IsCompoundFile -->
Int8 - HasBlocks -->
Int8 - IndexSort -->
Int32count, followed bycountSortField - SortField -->
Stringsort class, followed by a per-sort bytestream (seeSortFieldProvider.readSortField(DataInput)) - Footer -->
CodecFooter
- 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.
- HasBlocks records whether the segment contains documents written as a block and guarantees consecutive document ids for all documents in the block
- 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- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSI_EXTENSIONFile extension used to storeSegmentInfo.
-
Constructor Summary
Constructors Constructor Description Lucene99SegmentInfoFormat()Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentInforead(Directory dir, String segment, byte[] segmentID, IOContext context)ReadSegmentInfodata from a directory.voidwrite(Directory dir, SegmentInfo si, IOContext ioContext)WriteSegmentInfodata.
-
-
-
Field Detail
-
SI_EXTENSION
public static final String SI_EXTENSION
File extension used to storeSegmentInfo.- See Also:
- Constant Field Values
-
-
Method Detail
-
read
public SegmentInfo read(Directory dir, String segment, byte[] segmentID, IOContext context) throws IOException
Description copied from class:SegmentInfoFormatReadSegmentInfodata from a directory.- Specified by:
readin classSegmentInfoFormat- Parameters:
dir- directory to read fromsegment- name of the segment to readsegmentID- expected identifier for the segment- Returns:
- infos instance to be populated with data
- Throws:
IOException- If an I/O error occurs
-
write
public void write(Directory dir, SegmentInfo si, IOContext ioContext) throws IOException
Description copied from class:SegmentInfoFormatWriteSegmentInfodata. The codec must add its SegmentInfo filename(s) toinfobefore doing i/o.- Specified by:
writein classSegmentInfoFormat- Throws:
IOException- If an I/O error occurs
-
-