public class BoostingTermQuery 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(String, byte[],int,int)
which returns 1 by default.
Payload scores are averaged across term occurrences in the document.
| Modifier and Type | Class and Description |
|---|---|
protected class |
BoostingTermQuery.BoostingTermWeight |
term| Constructor and Description |
|---|
BoostingTermQuery(Term term) |
| Modifier and Type | Method and Description |
|---|---|
protected Weight |
createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(java.lang.Object o)
Returns true iff
o is equal to this. |
extractTerms, getField, getPayloadSpans, getSpans, getTerm, getTerms, hashCode, toStringclone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weightpublic BoostingTermQuery(Term term)
protected Weight createWeight(Searcher searcher) throws java.io.IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class SpanQueryjava.io.IOExceptionpublic boolean equals(java.lang.Object o)
SpanTermQueryo is equal to this.equals in class SpanTermQueryCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.