Class PerFieldSimilarityWrapper
Provides the ability to use a different Similarity for different fields.
Subclasses should implement Get(String) to return an appropriate Similarity (for example, using field-specific parameter values) for the field.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
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)
System.Object.ToString()
Namespace: Lucene.Net.Search.Similarities
Assembly: Lucene.Net.dll
Syntax
public abstract class PerFieldSimilarityWrapper : Similarity
Constructors
| Improve this Doc View SourcePerFieldSimilarityWrapper()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
protected PerFieldSimilarityWrapper()
Methods
| Improve this Doc View SourceComputeNorm(FieldInvertState)
Declaration
public sealed override long ComputeNorm(FieldInvertState state)
Parameters
Type | Name | Description |
---|---|---|
FieldInvertState | state |
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
| Improve this Doc View SourceComputeWeight(Single, CollectionStatistics, TermStatistics[])
Declaration
public sealed override Similarity.SimWeight ComputeWeight(float queryBoost, CollectionStatistics collectionStats, params TermStatistics[] termStats)
Parameters
Type | Name | Description |
---|---|---|
System.Single | queryBoost | |
CollectionStatistics | collectionStats | |
TermStatistics[] | termStats |
Returns
Type | Description |
---|---|
Similarity.SimWeight |
Overrides
| Improve this Doc View SourceGet(String)
Returns a Similarity for scoring a field.
Declaration
public abstract Similarity Get(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
Similarity |
GetSimScorer(Similarity.SimWeight, AtomicReaderContext)
Declaration
public sealed override Similarity.SimScorer GetSimScorer(Similarity.SimWeight weight, AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
Similarity.SimWeight | weight | |
AtomicReaderContext | context |
Returns
Type | Description |
---|---|
Similarity.SimScorer |