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, toString
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
public BoostingTermQuery(Term term)
protected Weight createWeight(Searcher searcher) throws java.io.IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class SpanQuery
java.io.IOException
public boolean equals(java.lang.Object o)
SpanTermQuery
o
is equal to this.equals
in class SpanTermQuery
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.