Home » lucene-3.0.1-src » org.apache » lucene » search » payloads » [javadoc | source]
public class: PayloadTermQuery [javadoc | source]

All Implemented Interfaces:
    Cloneable, Serializable

This class is very similar to 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(int, String, int, int, byte[],int,int) which returns 1 by default.

Payload scores are aggregated using a pluggable PayloadFunction .
Nested Class Summary:
protected class  PayloadTermQuery.PayloadTermWeight   
Field Summary
protected  PayloadFunction function     
Fields inherited from org.apache.lucene.search.spans.SpanTermQuery:
 public PayloadTermQuery(Term term,
    PayloadFunction function) 
 public PayloadTermQuery(Term term,
    PayloadFunction function,
    boolean includeSpanScore) 
Method from org.apache.lucene.search.payloads.PayloadTermQuery Summary:
createWeight,   equals,   hashCode
Methods from org.apache.lucene.search.spans.SpanTermQuery:
equals,   extractTerms,   getField,   getSpans,   getTerm,   hashCode,   toString
Methods from org.apache.lucene.search.spans.SpanQuery:
createWeight,   getField,   getSpans
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.PayloadTermQuery Detail:
 public Weight createWeight(Searcher searcher) throws IOException 
 public boolean equals(Object obj) 
 public int hashCode()