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.StringDATA_EXTENSIONExtension of compound file(package private) static BytesRefHEADER(package private) static java.lang.StringOFFSETPATTERN(package private) static BytesRefTABLE(package private) static BytesRefTABLEEND(package private) static BytesRefTABLENAME(package private) static BytesRefTABLEPOS(package private) static BytesRefTABLESTART
-
Constructor Summary
Constructors Constructor Description SimpleTextCompoundFormat()Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundDirectorygetCompoundReader(Directory dir, SegmentInfo si, IOContext context)Returns a Directory view (read-only) for the compound files in this segmentprivate java.lang.StringstripPrefix(BytesRefBuilder scratch, BytesRef prefix)voidwrite(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:CompoundFormatReturns a Directory view (read-only) for the compound files in this segment- Specified by:
getCompoundReaderin classCompoundFormat- Throws:
java.io.IOException
-
write
public void write(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
Description copied from class:CompoundFormatPacks the provided segment's files into a compound format. All files referenced by the providedSegmentInfomust haveCodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)andCodecUtil.writeFooter(org.apache.lucene.store.IndexOutput).- Specified by:
writein classCompoundFormat- Throws:
java.io.IOException
-
stripPrefix
private java.lang.String stripPrefix(BytesRefBuilder scratch, BytesRef prefix)
-
-