public class SimpleTextCompoundFormat extends CompoundFormat
FOR RECREATIONAL USE ONLY
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
DATA_EXTENSION
Extension of compound file
|
(package private) static BytesRef |
HEADER |
(package private) static java.lang.String |
OFFSETPATTERN |
(package private) static BytesRef |
TABLE |
(package private) static BytesRef |
TABLEEND |
(package private) static BytesRef |
TABLENAME |
(package private) static BytesRef |
TABLEPOS |
(package private) static BytesRef |
TABLESTART |
Constructor and Description |
---|
SimpleTextCompoundFormat()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
Directory |
getCompoundReader(Directory dir,
SegmentInfo si,
IOContext context)
Returns a Directory view (read-only) for the compound files in this segment
|
private java.lang.String |
stripPrefix(BytesRefBuilder scratch,
BytesRef prefix) |
void |
write(Directory dir,
SegmentInfo si,
IOContext context)
Packs the provided segment's files into a compound format.
|
static final java.lang.String DATA_EXTENSION
static final BytesRef HEADER
static final BytesRef TABLE
static final BytesRef TABLENAME
static final BytesRef TABLESTART
static final BytesRef TABLEEND
static final BytesRef TABLEPOS
static final java.lang.String OFFSETPATTERN
public Directory getCompoundReader(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
CompoundFormat
getCompoundReader
in class CompoundFormat
java.io.IOException
public void write(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
CompoundFormat
SegmentInfo
must have CodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
and CodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
.write
in class CompoundFormat
java.io.IOException
private java.lang.String stripPrefix(BytesRefBuilder scratch, BytesRef prefix)