Module org.apache.lucene.codecs
Class SimpleTextCompoundFormat
- java.lang.Object
-
- org.apache.lucene.codecs.CompoundFormat
-
- org.apache.lucene.codecs.simpletext.SimpleTextCompoundFormat
-
public class SimpleTextCompoundFormat extends CompoundFormat
plain text compound format.FOR RECREATIONAL USE ONLY
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description SimpleTextCompoundFormat()
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundDirectory
getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
Returns a Directory view (read-only) for the compound files in this segmentprivate 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.
-
-
-
Field Detail
-
DATA_EXTENSION
static final java.lang.String DATA_EXTENSION
Extension of compound file- See Also:
- Constant Field Values
-
HEADER
static final BytesRef HEADER
-
TABLE
static final BytesRef TABLE
-
TABLENAME
static final BytesRef TABLENAME
-
TABLESTART
static final BytesRef TABLESTART
-
TABLEEND
static final BytesRef TABLEEND
-
TABLEPOS
static final BytesRef TABLEPOS
-
OFFSETPATTERN
static final java.lang.String OFFSETPATTERN
-
-
Method Detail
-
getCompoundReader
public CompoundDirectory getCompoundReader(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
Description copied from class:CompoundFormat
Returns a Directory view (read-only) for the compound files in this segment- Specified by:
getCompoundReader
in classCompoundFormat
- Throws:
java.io.IOException
-
write
public void write(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
Description copied from class:CompoundFormat
Packs the provided segment's files into a compound format. All files referenced by the providedSegmentInfo
must haveCodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
andCodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
.- Specified by:
write
in classCompoundFormat
- Throws:
java.io.IOException
-
stripPrefix
private java.lang.String stripPrefix(BytesRefBuilder scratch, BytesRef prefix)
-
-