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
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFilterCodec(String name, Codec delegate) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionEncodes/decodes compound filesEncodes/decodes docvaluesEncodes/decodes field infos fileEncodes/decodes numeric vector fieldsEncodes/decodes live docsEncodes/decodes document normalization valuesEncodes/decodes points indexEncodes/decodes postingsEncodes/decodes segment info fileEncodes/decodes stored fieldsEncodes/decodes term vectorsMethods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
-
Field Details
-
delegate
The codec to filter.
-
-
Constructor Details
-
FilterCodec
Sole constructor. When subclassing this codec, create a no-arg ctor and pass the delegate codec and a unique name to this ctor.
-
-
Method Details
-
docValuesFormat
Description copied from class:CodecEncodes/decodes docvalues- Specified by:
docValuesFormatin classCodec
-
fieldInfosFormat
Description copied from class:CodecEncodes/decodes field infos file- Specified by:
fieldInfosFormatin classCodec
-
liveDocsFormat
Description copied from class:CodecEncodes/decodes live docs- Specified by:
liveDocsFormatin classCodec
-
normsFormat
Description copied from class:CodecEncodes/decodes document normalization values- Specified by:
normsFormatin classCodec
-
postingsFormat
Description copied from class:CodecEncodes/decodes postings- Specified by:
postingsFormatin classCodec
-
segmentInfoFormat
Description copied from class:CodecEncodes/decodes segment info file- Specified by:
segmentInfoFormatin classCodec
-
storedFieldsFormat
Description copied from class:CodecEncodes/decodes stored fields- Specified by:
storedFieldsFormatin classCodec
-
termVectorsFormat
Description copied from class:CodecEncodes/decodes term vectors- Specified by:
termVectorsFormatin classCodec
-
compoundFormat
Description copied from class:CodecEncodes/decodes compound files- Specified by:
compoundFormatin classCodec
-
pointsFormat
Description copied from class:CodecEncodes/decodes points index- Specified by:
pointsFormatin classCodec
-
knnVectorsFormat
Description copied from class:CodecEncodes/decodes numeric vector fields- Specified by:
knnVectorsFormatin classCodec
-