Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Codec
    FilterCodec
    Inherited Members
    Codec.SetCodecFactory(ICodecFactory)
    Codec.GetCodecFactory()
    Codec.Name
    Codec.ForName(string)
    Codec.AvailableCodecs
    Codec.Default
    Codec.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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
    Codec.DocValuesFormat

    FieldInfosFormat

    Encodes/decodes field infos file.

    Declaration
    public override FieldInfosFormat FieldInfosFormat { get; }
    Property Value
    Type Description
    FieldInfosFormat
    Overrides
    Codec.FieldInfosFormat

    LiveDocsFormat

    Encodes/decodes live docs.

    Declaration
    public override LiveDocsFormat LiveDocsFormat { get; }
    Property Value
    Type Description
    LiveDocsFormat
    Overrides
    Codec.LiveDocsFormat

    NormsFormat

    Encodes/decodes document normalization values.

    Declaration
    public override NormsFormat NormsFormat { get; }
    Property Value
    Type Description
    NormsFormat
    Overrides
    Codec.NormsFormat

    PostingsFormat

    Encodes/decodes postings.

    Declaration
    public override PostingsFormat PostingsFormat { get; }
    Property Value
    Type Description
    PostingsFormat
    Overrides
    Codec.PostingsFormat

    SegmentInfoFormat

    Encodes/decodes segment info file.

    Declaration
    public override SegmentInfoFormat SegmentInfoFormat { get; }
    Property Value
    Type Description
    SegmentInfoFormat
    Overrides
    Codec.SegmentInfoFormat

    StoredFieldsFormat

    Encodes/decodes stored fields.

    Declaration
    public override StoredFieldsFormat StoredFieldsFormat { get; }
    Property Value
    Type Description
    StoredFieldsFormat
    Overrides
    Codec.StoredFieldsFormat

    TermVectorsFormat

    Encodes/decodes term vectors.

    Declaration
    public override TermVectorsFormat TermVectorsFormat { get; }
    Property Value
    Type Description
    TermVectorsFormat
    Overrides
    Codec.TermVectorsFormat
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.