public class Lucene70SegmentInfoFormat extends SegmentInfoFormat
Files:
IndexHeader
Int32
String
String
Set<String>
Map<String,String>
Int8
Int32
count, followed by count
SortFieldString
field name, followed by Int32
sort type ID,
followed by Int8
indicating reversed sort, followed by a type-specific encoding of the optional missing value
CodecFooter
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 |
---|
Lucene70SegmentInfoFormat()
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
SegmentInfoFormat
SegmentInfo
data from a directory.read
in class SegmentInfoFormat
dir
- 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
SegmentInfoFormat
SegmentInfo
data.
The codec must add its SegmentInfo filename(s) to info
before doing i/o.write
in class SegmentInfoFormat
IOException
- If an I/O error occursCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.