Class RandomSimilarityProvider
Similarity implementation that randomizes Similarity implementations per-field.
The choices are 'sticky', so the selected algorithm is always used for the same field.
Inheritance
System.Object
Lucene.Net.Search.Similarities.Similarity
Lucene.Net.Search.Similarities.PerFieldSimilarityWrapper
RandomSimilarityProvider
Inherited Members
Lucene.Net.Search.Similarities.PerFieldSimilarityWrapper.ComputeNorm(Lucene.Net.Index.FieldInvertState)
Lucene.Net.Search.Similarities.PerFieldSimilarityWrapper.ComputeWeight(System.Single, Lucene.Net.Search.CollectionStatistics, Lucene.Net.Search.TermStatistics[])
Lucene.Net.Search.Similarities.PerFieldSimilarityWrapper.GetSimScorer(Lucene.Net.Search.Similarities.Similarity.SimWeight, Lucene.Net.Index.AtomicReaderContext)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.TestFramework.dll
Syntax
public class RandomSimilarityProvider : PerFieldSimilarityWrapper
Constructors
| Improve this Doc View SourceRandomSimilarityProvider(Random)
Declaration
public RandomSimilarityProvider(Random random)
Parameters
Type | Name | Description |
---|---|---|
System.Random | random |
Methods
| Improve this Doc View SourceCoord(Int32, Int32)
Declaration
public override float Coord(int overlap, int maxOverlap)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | overlap | |
System.Int32 | maxOverlap |
Returns
Type | Description |
---|---|
System.Single |
Overrides
Lucene.Net.Search.Similarities.Similarity.Coord(System.Int32, System.Int32)
|
Improve this Doc
View Source
Get(String)
Declaration
public override Similarity Get(string field)
Parameters
Type | Name | Description |
---|---|---|
System.String | field |
Returns
Type | Description |
---|---|
Lucene.Net.Search.Similarities.Similarity |
Overrides
Lucene.Net.Search.Similarities.PerFieldSimilarityWrapper.Get(System.String)
|
Improve this Doc
View Source
QueryNorm(Single)
Declaration
public override float QueryNorm(float sumOfSquaredWeights)
Parameters
Type | Name | Description |
---|---|---|
System.Single | sumOfSquaredWeights |
Returns
Type | Description |
---|---|
System.Single |
Overrides
Lucene.Net.Search.Similarities.Similarity.QueryNorm(System.Single)
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()