org.apache.lucene.search.payloads
Class BoostingTermQuery
- 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:
- java.io.Serializable, java.lang.Cloneable
public class BoostingTermQuery extends SpanTermQuery
The BoostingTermQuery is very similar to theSpanTermQueryexcept that it factors in the value of the payload located at each of the positions where theTermoccurs.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.
-
-
Constructor Summary
Constructors Constructor and Description BoostingTermQuery(Term term)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Returns true iffois equal to this.-
Methods inherited from class org.apache.lucene.search.spans.SpanTermQuery
extractTerms, getField, getSpans, getTerm, getTerms, hashCode, toString
-
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
-
-
-
-
Constructor Detail
-
BoostingTermQuery
public BoostingTermQuery(Term term)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:SpanTermQueryReturns true iffois equal to this.- Overrides:
equalsin classSpanTermQuery
-
-
DataMelt 3.0 © DataMelt by jWork.ORG