Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class RandomCodec

    Lucene.Net.Codecs.Codec that assigns per-field random Lucene.Net.Codecs.PostingsFormats.

    The same field/format assignment will happen regardless of order, a hash is computed up front that determines the mapping. This means fields can be put into things like HashSet<T>s and added to documents in different orders and the test will still be deterministic and reproducable.
    Inheritance
    object
    Codec
    Lucene46Codec
    RandomCodec
    Inherited Members
    Lucene46Codec.StoredFieldsFormat
    Lucene46Codec.TermVectorsFormat
    Lucene46Codec.PostingsFormat
    Lucene46Codec.FieldInfosFormat
    Lucene46Codec.SegmentInfoFormat
    Lucene46Codec.LiveDocsFormat
    Lucene46Codec.DocValuesFormat
    Lucene46Codec.NormsFormat
    Codec.SetCodecFactory(ICodecFactory)
    Codec.GetCodecFactory()
    Codec.Name
    Codec.ForName(string)
    Codec.AvailableCodecs
    Codec.Default
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.TestFramework.dll
    Syntax
    public class RandomCodec : Lucene46Codec

    Constructors

    RandomCodec(Random)

    Lucene.Net.Codecs.Codec that assigns per-field random Lucene.Net.Codecs.PostingsFormats.

    The same field/format assignment will happen regardless of order, a hash is computed up front that determines the mapping. This means fields can be put into things like HashSet<T>s and added to documents in different orders and the test will still be deterministic and reproducable.
    Declaration
    public RandomCodec(Random random)
    Parameters
    Type Name Description
    Random random

    RandomCodec(Random, ISet<string>)

    Lucene.Net.Codecs.Codec that assigns per-field random Lucene.Net.Codecs.PostingsFormats.

    The same field/format assignment will happen regardless of order, a hash is computed up front that determines the mapping. This means fields can be put into things like HashSet<T>s and added to documents in different orders and the test will still be deterministic and reproducable.
    Declaration
    public RandomCodec(Random random, ISet<string> avoidCodecs)
    Parameters
    Type Name Description
    Random random
    ISet<string> avoidCodecs

    Properties

    DvFormatNames

    unique set of docvalues format names this codec knows about

    Declaration
    public ISet<string> DvFormatNames { get; set; }
    Property Value
    Type Description
    ISet<string>

    FormatNames

    unique set of format names this codec knows about

    Declaration
    public ISet<string> FormatNames { get; set; }
    Property Value
    Type Description
    ISet<string>

    Methods

    GetDocValuesFormatForField(string)

    Returns the docvalues format that should be used for writing new segments of field.

    The default implementation always returns "Lucene45"
    Declaration
    public override DocValuesFormat GetDocValuesFormatForField(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    DocValuesFormat
    Overrides
    Lucene46Codec.GetDocValuesFormatForField(string)

    GetPostingsFormatForField(string)

    Returns the postings format that should be used for writing new segments of field.

    The default implementation always returns "Lucene41"
    Declaration
    public override PostingsFormat GetPostingsFormatForField(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    PostingsFormat
    Overrides
    Lucene46Codec.GetPostingsFormatForField(string)

    ToString()

    Returns the codec's name. Subclasses can override to provide more detail (such as parameters).

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    Lucene.Net.Codecs.Codec.ToString()
    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.