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.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.AvailableCodecs
Codec.Default
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
.
Declaration
public override DocValuesFormat GetDocValuesFormatForField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
DocValuesFormat |
Overrides
GetPostingsFormatForField(string)
Returns the postings format that should be used for writing
new segments of field
.
Declaration
public override PostingsFormat GetPostingsFormatForField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
PostingsFormat |
Overrides
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()