Class MaxPayloadFunction
Returns the maximum payload score seen, else 1 if there are no payloads on the doc.
Is thread safe and completely reusable.Inherited Members
Namespace: Lucene.Net.Search.Payloads
Assembly: Lucene.Net.dll
Syntax
public class MaxPayloadFunction : PayloadFunction
Methods
CurrentScore(int, string, int, int, int, float, float)
Calculate the score up to this point for this doc and field
Declaration
public override 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 |
Overrides
See Also
DocScore(int, string, int, float)
Calculate the final score for all the payloads seen so far for this doc/field
Declaration
public override 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 |
Overrides
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |