Namespace Lucene.Net.Search.Payloads
The payloads package provides Query mechanisms for finding and using payloads.
The following Query implementations are provided:
- PayloadTermQuery -- Boost a term's score based on the value of the payload located at that term.
- PayloadNearQuery -- A SpanNearQuery that factors in the value of the payloads located at each of the positions where the spans occur.
Classes
AveragePayloadFunction
Calculate the final score as the average score of all payloads seen.
Is thread safe and completely reusable.
MaxPayloadFunction
Returns the maximum payload score seen, else 1 if there are no payloads on the doc.
Is thread safe and completely reusable.
MinPayloadFunction
Calculates the minimum payload seen
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
PayloadNearQuery
This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.
NOTE: In order to take advantage of this with the default scoring implementation (DefaultSimilarity), you must override ScorePayload(Int32, Int32, Int32, BytesRef), which returns 1 by default.
Payload scores are aggregated using a pluggable PayloadFunction.
PayloadNearQuery.PayloadNearSpanScorer
PayloadNearQuery.PayloadNearSpanWeight
PayloadSpanUtil
Experimental class to get set of payloads for most standard Lucene queries. Operates like Highlighter - IndexReader should only contain doc of interest, best to use MemoryIndex.
Note
This API is experimental and might change in incompatible ways in the next release.
PayloadTermQuery
This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.
NOTE: In order to take advantage of this with the default scoring implementation (DefaultSimilarity), you must override ScorePayload(Int32, Int32, Int32, BytesRef), which returns 1 by default.
Payload scores are aggregated using a pluggable PayloadFunction.