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
- Direct Known Subclasses:
CompressingCodec
,OakCodec
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 Lucene46's
LiveDocsFormat
:public final class CustomCodec extends FilterCodec { public CustomCodec() { super("CustomCodec", new Lucene46Codec()); } 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocValuesFormat
docValuesFormat()
Encodes/decodes docvaluesFieldInfosFormat
fieldInfosFormat()
Encodes/decodes field infos fileLiveDocsFormat
liveDocsFormat()
Encodes/decodes live docsNormsFormat
normsFormat()
Encodes/decodes document normalization valuesPostingsFormat
postingsFormat()
Encodes/decodes postingsSegmentInfoFormat
segmentInfoFormat()
Encodes/decodes segment info fileStoredFieldsFormat
storedFieldsFormat()
Encodes/decodes stored fieldsTermVectorsFormat
termVectorsFormat()
Encodes/decodes term vectors-
Methods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
-
-
-
-
Method Detail
-
docValuesFormat
public DocValuesFormat docValuesFormat()
Description copied from class:Codec
Encodes/decodes docvalues- Specified by:
docValuesFormat
in classCodec
-
fieldInfosFormat
public FieldInfosFormat fieldInfosFormat()
Description copied from class:Codec
Encodes/decodes field infos file- Specified by:
fieldInfosFormat
in classCodec
-
liveDocsFormat
public LiveDocsFormat liveDocsFormat()
Description copied from class:Codec
Encodes/decodes live docs- Specified by:
liveDocsFormat
in classCodec
-
normsFormat
public NormsFormat normsFormat()
Description copied from class:Codec
Encodes/decodes document normalization values- Specified by:
normsFormat
in classCodec
-
postingsFormat
public PostingsFormat postingsFormat()
Description copied from class:Codec
Encodes/decodes postings- Specified by:
postingsFormat
in classCodec
-
segmentInfoFormat
public SegmentInfoFormat segmentInfoFormat()
Description copied from class:Codec
Encodes/decodes segment info file- Specified by:
segmentInfoFormat
in classCodec
-
storedFieldsFormat
public StoredFieldsFormat storedFieldsFormat()
Description copied from class:Codec
Encodes/decodes stored fields- Specified by:
storedFieldsFormat
in classCodec
-
termVectorsFormat
public TermVectorsFormat termVectorsFormat()
Description copied from class:Codec
Encodes/decodes term vectors- Specified by:
termVectorsFormat
in classCodec
-
-