public class Lucene50SegmentInfoFormat extends SegmentInfoFormat
Files:
IndexHeaderInt32StringSet<String>Map<String,String>Int8CodecFooter
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.SegmentInfos| Modifier and Type | Field and Description |
|---|---|
static String |
SI_EXTENSION
File extension used to store
SegmentInfo. |
| Constructor and Description |
|---|
Lucene50SegmentInfoFormat()
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 si,
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 si, 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-2015 Apache Software Foundation. All Rights Reserved.