PayloadScoreQuery to wrap SpanTermQuery@Deprecated public class PayloadTermQuery extends SpanTermQuery
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 ClassicSimilarity.scorePayload(int, int, int, BytesRef),
which returns 1 by default.
Payload scores are aggregated using a pluggable PayloadFunction.
SpanTermQuery.SpanTermWeight| Modifier and Type | Field and Description |
|---|---|
protected PayloadFunction |
function
Deprecated.
|
term, termContext| Constructor and Description |
|---|
PayloadTermQuery(Term term,
PayloadFunction function)
Deprecated.
|
PayloadTermQuery(Term term,
PayloadFunction function,
boolean includeSpanScore)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
SpanWeight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
int |
hashCode()
Deprecated.
|
getField, getTerm, toStringgetTermContexts, getTermContexts, rewriteprotected PayloadFunction function
public PayloadTermQuery(Term term, PayloadFunction function)
public PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)
public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
createWeight in class SpanTermQueryIOExceptionpublic int hashCode()
hashCode in class SpanTermQuerypublic boolean equals(Object obj)
equals in class SpanTermQueryCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.