public class

PayloadTermQuery

extends SpanTermQuery
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.PayloadTermQuery

Class Overview

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

Payload scores are aggregated using a pluggable PayloadFunction.

Summary

Nested Classes
class PayloadTermQuery.PayloadTermWeight  
Fields
protected PayloadFunction function
[Expand]
Inherited Fields
From class org.apache.lucene.search.spans.SpanTermQuery
Public Constructors
PayloadTermQuery(Term term, PayloadFunction function)
PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)
Public Methods
Weight createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
boolean equals(Object obj)
int hashCode()
[Expand]
Inherited Methods
From class org.apache.lucene.search.spans.SpanTermQuery
From class org.apache.lucene.search.spans.SpanQuery
From class org.apache.lucene.search.Query
From class java.lang.Object

Fields

protected PayloadFunction function

Public Constructors

public PayloadTermQuery (Term term, PayloadFunction function)

public PayloadTermQuery (Term term, PayloadFunction function, boolean includeSpanScore)

Public Methods

public Weight createWeight (Searcher searcher)

Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Throws
IOException

public boolean equals (Object obj)

public int hashCode ()