public class Lucene62SegmentInfoFormat extends SegmentInfoFormat
Files:
IndexHeaderInt32StringSet<String>Map<String,String>Int8Int32 count, followed by count SortFieldString field name, followed by Int32 sort type ID,
followed by Int8 indicatating reversed sort, followed by a type-specific encoding of the optional missing value
CodecFooterIndexWriter, 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.SegmentInfos| Modifier and Type | Field and Description |
|---|---|
static String |
SI_EXTENSION
File extension used to store
SegmentInfo. |
| Constructor and Description |
|---|
Lucene62SegmentInfoFormat()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SegmentInfo |
read(Directory dir,
String segment,
byte[] segmentID,
IOContext context)
Read
SegmentInfo data from a directory. |
void |
write(Directory dir,
SegmentInfo info,
IOContext ioContext)
Write
SegmentInfo data. |
public static final String SI_EXTENSION
SegmentInfo.public SegmentInfo read(Directory dir, String segment, byte[] segmentID, IOContext context) throws IOException
SegmentInfoFormatSegmentInfo data from a directory.read in class SegmentInfoFormatdir - directory to read fromsegment - name of the segment to readsegmentID - expected identifier for the segmentIOException - If an I/O error occurspublic void write(Directory dir, SegmentInfo info, IOContext ioContext) throws IOException
SegmentInfoFormatSegmentInfo data.
The codec must add its SegmentInfo filename(s) to info before doing i/o.write in class SegmentInfoFormatIOException - If an I/O error occursCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.