Class FilterCodec
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 sealed class CustomCodec : FilterCodec
{
public CustomCodec()
: base("CustomCodec", new Lucene46Codec())
{
}
public override LiveDocsFormat LiveDocsFormat
{
get { return new CustomLiveDocsFormat(); }
}
}
Please note: Don't call ForName(string) from
the no-arg constructor of your own codec. When the DefaultCodecFactory
loads your own Codec, the DefaultCodecFactory has not yet fully initialized!
If you want to extend another Codec, instantiate it directly by calling
its constructor.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Codecs
Assembly: Lucene.Net.dll
Syntax
public abstract class FilterCodec : Codec
Constructors
FilterCodec(Codec)
Sole constructor. When subclassing this codec, create a no-arg ctor and pass the delegate codec and a unique name to this ctor.
Declaration
protected FilterCodec(Codec @delegate)
Parameters
Type | Name | Description |
---|---|---|
Codec | delegate |
Fields
m_delegate
The codec to filter.
Declaration
protected readonly Codec m_delegate
Field Value
Type | Description |
---|---|
Codec |
Properties
DocValuesFormat
Encodes/decodes docvalues.
Declaration
public override DocValuesFormat DocValuesFormat { get; }
Property Value
Type | Description |
---|---|
DocValuesFormat |
Overrides
FieldInfosFormat
Encodes/decodes field infos file.
Declaration
public override FieldInfosFormat FieldInfosFormat { get; }
Property Value
Type | Description |
---|---|
FieldInfosFormat |
Overrides
LiveDocsFormat
Encodes/decodes live docs.
Declaration
public override LiveDocsFormat LiveDocsFormat { get; }
Property Value
Type | Description |
---|---|
LiveDocsFormat |
Overrides
NormsFormat
Encodes/decodes document normalization values.
Declaration
public override NormsFormat NormsFormat { get; }
Property Value
Type | Description |
---|---|
NormsFormat |
Overrides
PostingsFormat
Encodes/decodes postings.
Declaration
public override PostingsFormat PostingsFormat { get; }
Property Value
Type | Description |
---|---|
PostingsFormat |
Overrides
SegmentInfoFormat
Encodes/decodes segment info file.
Declaration
public override SegmentInfoFormat SegmentInfoFormat { get; }
Property Value
Type | Description |
---|---|
SegmentInfoFormat |
Overrides
StoredFieldsFormat
Encodes/decodes stored fields.
Declaration
public override StoredFieldsFormat StoredFieldsFormat { get; }
Property Value
Type | Description |
---|---|
StoredFieldsFormat |
Overrides
TermVectorsFormat
Encodes/decodes term vectors.
Declaration
public override TermVectorsFormat TermVectorsFormat { get; }
Property Value
Type | Description |
---|---|
TermVectorsFormat |