Package org.apache.lucene.codecs
Class CompoundFormat
java.lang.Object
org.apache.lucene.codecs.CompoundFormat
- Direct Known Subclasses:
Lucene90CompoundFormat
Encodes/decodes compound files
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract CompoundDirectory
getCompoundReader
(Directory dir, SegmentInfo si, IOContext context) Returns a Directory view (read-only) for the compound files in this segmentabstract void
write
(Directory dir, SegmentInfo si, IOContext context) Packs the provided segment's files into a compound format.
-
Constructor Details
-
CompoundFormat
protected CompoundFormat()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
getCompoundReader
public abstract CompoundDirectory getCompoundReader(Directory dir, SegmentInfo si, IOContext context) throws IOException Returns a Directory view (read-only) for the compound files in this segment- Throws:
IOException
-
write
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)
.- Throws:
IOException
-