Serializable
, Cloneable
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.
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, wait
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
extractTerms, getField, getSpans, getTerm, toString
protected PayloadFunction function
public PayloadTermQuery(Term term, PayloadFunction function)
public PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)
public Weight createWeight(Searcher searcher) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class SpanQuery
IOException
public int hashCode()
hashCode
in class SpanTermQuery
public boolean equals(Object obj)
equals
in class SpanTermQuery
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.