org.apache.lucene.search.payloads
public class: BoostingTermQuery [javadoc |
source]
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.spans.SpanQuery
org.apache.lucene.search.spans.SpanTermQuery
org.apache.lucene.search.payloads.BoostingTermQuery
All Implemented Interfaces:
Cloneable, Serializable
The BoostingTermQuery is very similar to the
org.apache.lucene.search.spans.SpanTermQuery except
that it factors in the value of the payload located at each of the positions where the
org.apache.lucene.index.Term occurs.
In order to take advantage of this, you must override org.apache.lucene.search.Similarity#scorePayload(String, byte[],int,int)
which returns 1 by default.
Payload scores are averaged across term occurrences in the document.
Also see:
- org.apache.lucene.search.Similarity#scorePayload(String, byte[], int, int)
Method from org.apache.lucene.search.payloads.BoostingTermQuery Summary: |
---|
createWeight, equals |
Methods from org.apache.lucene.search.Query: |
---|
clone, combine, createWeight, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.lucene.search.payloads.BoostingTermQuery Detail: |
protected Weight createWeight(Searcher searcher) throws IOException {
return new BoostingTermWeight(this, searcher);
}
|
public boolean equals(Object o) {
if (!(o instanceof BoostingTermQuery))
return false;
BoostingTermQuery other = (BoostingTermQuery) o;
return (this.getBoost() == other.getBoost())
&& this.term.equals(other.term);
}
|