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.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
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 override sealed 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 override sealed 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 override sealed Similarity.SimScorer GetSimScorer(Similarity.SimWeight weight, AtomicReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
Similarity.SimWeight | weight | |
AtomicReaderContext | context |
Returns
Type | Description |
---|---|
Similarity.SimScorer |