Home » lucene-3.0.1-src » org.apache » lucene » search » payloads » [javadoc | source]
org.apache.lucene.search.payloads
public class: PayloadNearQuery [javadoc | source]
java.lang.Object
   org.apache.lucene.search.Query
      org.apache.lucene.search.spans.SpanQuery
         org.apache.lucene.search.spans.SpanNearQuery
            org.apache.lucene.search.payloads.PayloadNearQuery

All Implemented Interfaces:
    Cloneable, Serializable

This class is very similar to org.apache.lucene.search.spans.SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the org.apache.lucene.search.spans.TermSpans occurs.

In order to take advantage of this, you must override org.apache.lucene.search.Similarity#scorePayload which returns 1 by default.

Payload scores are aggregated using a pluggable PayloadFunction .

Nested Class Summary:
public class  PayloadNearQuery.PayloadNearSpanWeight   
public class  PayloadNearQuery.PayloadNearSpanScorer   
Field Summary
protected  String fieldName     
protected  PayloadFunction function     
Fields inherited from org.apache.lucene.search.spans.SpanNearQuery:
clauses,  slop,  inOrder,  field
Constructor:
 public PayloadNearQuery(SpanQuery[] clauses,
    int slop,
    boolean inOrder) 
 public PayloadNearQuery(SpanQuery[] clauses,
    int slop,
    boolean inOrder,
    PayloadFunction function) 
Method from org.apache.lucene.search.payloads.PayloadNearQuery Summary:
clone,   createWeight,   equals,   hashCode,   toString
Methods from org.apache.lucene.search.spans.SpanNearQuery:
clone,   equals,   extractTerms,   getClauses,   getField,   getSlop,   getSpans,   hashCode,   isInOrder,   rewrite,   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.PayloadNearQuery Detail:
 public Object clone() 
 public Weight createWeight(Searcher searcher) throws IOException 
 public boolean equals(Object obj) 
 public int hashCode() 
 public String toString(String field)