public abstract class BBoxSimilarityValueSource extends DoubleValuesSource
ShapeValuesSource
returning a Rectangle
per-document.
Implementers: remember to implement equals and hashCode if you have fields!
SCORES
Constructor and Description |
---|
BBoxSimilarityValueSource(ShapeValuesSource bboxValueSource) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Explanation |
explain(LeafReaderContext ctx,
int docId,
Explanation scoreExplanation) |
DoubleValues |
getValues(LeafReaderContext readerContext,
DoubleValues scores) |
int |
hashCode() |
boolean |
needsScores() |
protected abstract double |
score(org.locationtech.spatial4j.shape.Rectangle rect,
AtomicReference<Explanation> exp)
Return a relevancy score.
|
protected abstract String |
similarityDescription()
A comma-separated list of configurable items of the subclass to put into
toString() . |
String |
toString() |
constant, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromScorer, getSortField, toLongValuesSource
public BBoxSimilarityValueSource(ShapeValuesSource bboxValueSource)
public String toString()
toString
in class DoubleValuesSource
protected abstract String similarityDescription()
toString()
.public DoubleValues getValues(LeafReaderContext readerContext, DoubleValues scores) throws IOException
getValues
in class DoubleValuesSource
IOException
protected abstract double score(org.locationtech.spatial4j.shape.Rectangle rect, AtomicReference<Explanation> exp)
exp
is provided then diagnostic information is added.rect
- The indexed rectangle; not null.exp
- Optional diagnostic holder.public boolean equals(Object o)
equals
in class DoubleValuesSource
public int hashCode()
hashCode
in class DoubleValuesSource
public Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) throws IOException
explain
in class DoubleValuesSource
IOException
public boolean needsScores()
needsScores
in class DoubleValuesSource
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.