PayloadScoreQuery
to wrap SpanNearQuery
@Deprecated public class PayloadNearQuery extends SpanNearQuery
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 ClassicSimilarity.scorePayload(int, int, int, BytesRef)
,
which returns 1 by default.
Payload scores are aggregated using a pluggable PayloadFunction
.
SpanNearQuery.Builder, SpanNearQuery.SpanNearWeight
Modifier and Type | Field and Description |
---|---|
protected String |
fieldName
Deprecated.
|
protected PayloadFunction |
function
Deprecated.
|
clauses, field, inOrder, slop
Constructor and Description |
---|
PayloadNearQuery(SpanQuery[] clauses,
int slop,
boolean inOrder)
Deprecated.
|
PayloadNearQuery(SpanQuery[] clauses,
int slop,
boolean inOrder,
PayloadFunction function)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
PayloadNearQuery |
clone()
Deprecated.
|
SpanWeight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
int |
hashCode()
Deprecated.
|
String |
toString(String field)
Deprecated.
|
getClauses, getField, getSlop, isInOrder, newOrderedNearQuery, newUnorderedNearQuery, rewrite
getTermContexts, getTermContexts
protected String fieldName
protected PayloadFunction function
public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, PayloadFunction function)
public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
createWeight
in class SpanNearQuery
IOException
public PayloadNearQuery clone()
public String toString(String field)
toString
in class SpanNearQuery
public int hashCode()
hashCode
in class SpanNearQuery
public boolean equals(Object obj)
equals
in class SpanNearQuery
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.