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.
Inherited Members
Namespace: Lucene.Net.Search.Payloads
Assembly: Lucene.Net.dll
Syntax
public abstract class PayloadFunction
Methods
CurrentScore(int, string, int, int, int, float, float)
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 |
|---|---|---|
| int | docId | The current doc |
| string | field | The field |
| int | start | The start position of the matching Span |
| int | end | The end position of the matching Span |
| int | numPayloadsSeen | The number of payloads seen so far |
| float | currentScore | The current score so far |
| float | currentPayloadScore | The score for the current payload |
Returns
| Type | Description |
|---|---|
| float | The new current Score |
See Also
DocScore(int, string, int, float)
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 |
|---|---|---|
| int | docId | The current doc |
| string | field | The current field |
| int | numPayloadsSeen | The total number of payloads seen on this document |
| float | payloadScore | The raw score for those payloads |
Returns
| Type | Description |
|---|---|
| float | The final score for the payloads |
See Also
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override abstract bool Equals(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
See Also
Explain(int, string, int, float)
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.
Declaration
public virtual Explanation Explain(int docId, string field, int numPayloadsSeen, float payloadScore)
Parameters
| Type | Name | Description |
|---|---|---|
| int | docId | |
| string | field | |
| int | numPayloadsSeen | |
| float | payloadScore |
Returns
| Type | Description |
|---|---|
| Explanation |
See Also
GetHashCode()
Serves as the default hash function.
Declaration
public override abstract int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |