Package org.apache.lucene.codecs
Class FilterCodec
- java.lang.Object
-
- org.apache.lucene.codecs.Codec
-
- org.apache.lucene.codecs.FilterCodec
-
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
public abstract class FilterCodec extends Codec
A codec that forwards all its method calls to another 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.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFilterCodec(String name, Codec delegate)Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundFormatcompoundFormat()Encodes/decodes compound filesDocValuesFormatdocValuesFormat()Encodes/decodes docvaluesFieldInfosFormatfieldInfosFormat()Encodes/decodes field infos fileKnnVectorsFormatknnVectorsFormat()Encodes/decodes numeric vector fieldsLiveDocsFormatliveDocsFormat()Encodes/decodes live docsNormsFormatnormsFormat()Encodes/decodes document normalization valuesPointsFormatpointsFormat()Encodes/decodes points indexPostingsFormatpostingsFormat()Encodes/decodes postingsSegmentInfoFormatsegmentInfoFormat()Encodes/decodes segment info fileStoredFieldsFormatstoredFieldsFormat()Encodes/decodes stored fieldsTermVectorsFormattermVectorsFormat()Encodes/decodes term vectors-
Methods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
-
-
-
-
Field Detail
-
delegate
protected final Codec delegate
The codec to filter.
-
-
Method Detail
-
docValuesFormat
public DocValuesFormat docValuesFormat()
Description copied from class:CodecEncodes/decodes docvalues- Specified by:
docValuesFormatin classCodec
-
fieldInfosFormat
public FieldInfosFormat fieldInfosFormat()
Description copied from class:CodecEncodes/decodes field infos file- Specified by:
fieldInfosFormatin classCodec
-
liveDocsFormat
public LiveDocsFormat liveDocsFormat()
Description copied from class:CodecEncodes/decodes live docs- Specified by:
liveDocsFormatin classCodec
-
normsFormat
public NormsFormat normsFormat()
Description copied from class:CodecEncodes/decodes document normalization values- Specified by:
normsFormatin classCodec
-
postingsFormat
public PostingsFormat postingsFormat()
Description copied from class:CodecEncodes/decodes postings- Specified by:
postingsFormatin classCodec
-
segmentInfoFormat
public SegmentInfoFormat segmentInfoFormat()
Description copied from class:CodecEncodes/decodes segment info file- Specified by:
segmentInfoFormatin classCodec
-
storedFieldsFormat
public StoredFieldsFormat storedFieldsFormat()
Description copied from class:CodecEncodes/decodes stored fields- Specified by:
storedFieldsFormatin classCodec
-
termVectorsFormat
public TermVectorsFormat termVectorsFormat()
Description copied from class:CodecEncodes/decodes term vectors- Specified by:
termVectorsFormatin classCodec
-
compoundFormat
public CompoundFormat compoundFormat()
Description copied from class:CodecEncodes/decodes compound files- Specified by:
compoundFormatin classCodec
-
pointsFormat
public PointsFormat pointsFormat()
Description copied from class:CodecEncodes/decodes points index- Specified by:
pointsFormatin classCodec
-
knnVectorsFormat
public KnnVectorsFormat knnVectorsFormat()
Description copied from class:CodecEncodes/decodes numeric vector fields- Specified by:
knnVectorsFormatin classCodec
-
-