Class PayloadNearQuery

All Implemented Interfaces:
Cloneable

public class PayloadNearQuery extends SpanNearQuery
This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.

NOTE: In order to take advantage of this with the default scoring implementation (DefaultSimilarity), you must override DefaultSimilarity.scorePayload(int, int, int, BytesRef), which returns 1 by default.

Payload scores are aggregated using a pluggable PayloadFunction.

See Also:
  • Field Details

  • Constructor Details

    • PayloadNearQuery

      public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
    • PayloadNearQuery

      public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, PayloadFunction function)
  • Method Details