Class PayloadFunction
An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.
Note
This API is experimental and might change in incompatible ways in the next release.
this class and its derivations are experimental and subject to change
Inheritance
Inherited Members
Namespace: Lucene.Net.Search.Payloads
Assembly: Lucene.Net.dll
Syntax
public abstract class PayloadFunction
Methods
| Improve this Doc View SourceCurrentScore(Int32, String, Int32, Int32, Int32, Single, Single)
Calculate the score up to this point for this doc and field
Declaration
public abstract float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docId | The current doc |
System.String | field | The field |
System.Int32 | start | The start position of the matching Span |
System.Int32 | end | The end position of the matching Span |
System.Int32 | numPayloadsSeen | The number of payloads seen so far |
System.Single | currentScore | The current score so far |
System.Single | currentPayloadScore | The score for the current payload |
Returns
Type | Description |
---|---|
System.Single | The new current Score |
See Also
| Improve this Doc View SourceDocScore(Int32, String, Int32, Single)
Calculate the final score for all the payloads seen so far for this doc/field
Declaration
public abstract float DocScore(int docId, string field, int numPayloadsSeen, float payloadScore)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docId | The current doc |
System.String | field | The current field |
System.Int32 | numPayloadsSeen | The total number of payloads seen on this document |
System.Single | payloadScore | The raw score for those payloads |
Returns
Type | Description |
---|---|
System.Single | The final score for the payloads |
Equals(Object)
Declaration
public abstract override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Explain(Int32, String, Int32, Single)
Declaration
public virtual Explanation Explain(int docId, string field, int numPayloadsSeen, float payloadScore)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docId | |
System.String | field | |
System.Int32 | numPayloadsSeen | |
System.Single | payloadScore |
Returns
Type | Description |
---|---|
Explanation |
GetHashCode()
Declaration
public abstract override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |