public abstract class FilterCodec extends Codec
Extend this class when you need to reuse the functionality of an existing
codec. For example, if you want to build a codec that redefines LuceneMN's
LiveDocsFormat
:
public final class CustomCodec extends FilterCodec { public CustomCodec() { super("CustomCodec", new LuceneMNCodec()); } public LiveDocsFormat liveDocsFormat() { return new CustomLiveDocsFormat(); } }
Please note: Don't call Codec.forName(java.lang.String)
from
the no-arg constructor of your own codec. When the SPI framework
loads your own Codec as SPI component, SPI has not yet fully initialized!
If you want to extend another Codec, instantiate it directly by calling
its constructor.
Modifier and Type | Field and Description |
---|---|
protected Codec |
delegate
The codec to filter.
|
Modifier | Constructor and Description |
---|---|
protected |
FilterCodec(String name,
Codec delegate)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
CompoundFormat |
compoundFormat()
Encodes/decodes compound files
|
DocValuesFormat |
docValuesFormat()
Encodes/decodes docvalues
|
FieldInfosFormat |
fieldInfosFormat()
Encodes/decodes field infos file
|
LiveDocsFormat |
liveDocsFormat()
Encodes/decodes live docs
|
NormsFormat |
normsFormat()
Encodes/decodes document normalization values
|
PointsFormat |
pointsFormat()
Encodes/decodes points index
|
PostingsFormat |
postingsFormat()
Encodes/decodes postings
|
SegmentInfoFormat |
segmentInfoFormat()
Encodes/decodes segment info file
|
StoredFieldsFormat |
storedFieldsFormat()
Encodes/decodes stored fields
|
TermVectorsFormat |
termVectorsFormat()
Encodes/decodes term vectors
|
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
protected final Codec delegate
public DocValuesFormat docValuesFormat()
Codec
docValuesFormat
in class Codec
public FieldInfosFormat fieldInfosFormat()
Codec
fieldInfosFormat
in class Codec
public LiveDocsFormat liveDocsFormat()
Codec
liveDocsFormat
in class Codec
public NormsFormat normsFormat()
Codec
normsFormat
in class Codec
public PostingsFormat postingsFormat()
Codec
postingsFormat
in class Codec
public SegmentInfoFormat segmentInfoFormat()
Codec
segmentInfoFormat
in class Codec
public StoredFieldsFormat storedFieldsFormat()
Codec
storedFieldsFormat
in class Codec
public TermVectorsFormat termVectorsFormat()
Codec
termVectorsFormat
in class Codec
public CompoundFormat compoundFormat()
Codec
compoundFormat
in class Codec
public PointsFormat pointsFormat()
Codec
pointsFormat
in class Codec
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.