Serializable, Cloneablepublic 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.
In order to take advantage of this, you must override
Similarity.scorePayload(int, String, int, int, byte[],int,int)
which returns 1 by default.
Payload scores are aggregated using a pluggable PayloadFunction.
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
PayloadTermQuery.PayloadTermWeight |
| Modifier and Type | Field | Description |
|---|---|---|
protected PayloadFunction |
function |
term| Constructor | Description |
|---|---|
PayloadTermQuery(Term term,
PayloadFunction function) |
|
PayloadTermQuery(Term term,
PayloadFunction function,
boolean includeSpanScore) |
| Modifier and Type | Method | Description |
|---|---|---|
Weight |
createWeight(Searcher searcher) |
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object obj) |
|
int |
hashCode() |
finalize, getClass, notify, notifyAll, wait, wait, waitclone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weightextractTerms, getField, getSpans, getTerm, toStringprotected PayloadFunction function
public PayloadTermQuery(Term term, PayloadFunction function)
public PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)
public Weight createWeight(Searcher searcher) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class SpanQueryIOExceptionpublic int hashCode()
hashCode in class SpanTermQuerypublic boolean equals(Object obj)
equals in class SpanTermQueryCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.