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 |
isCacheable(LeafReaderContext ctx) |
boolean |
needsScores() |
DoubleValuesSource |
rewrite(IndexSearcher searcher) |
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, fromQuery, fromScorer, getSortField, toLongValuesSourcepublic BBoxSimilarityValueSource(ShapeValuesSource bboxValueSource)
public DoubleValuesSource rewrite(IndexSearcher searcher) throws IOException
rewrite in class DoubleValuesSourceIOExceptionpublic String toString()
toString in class DoubleValuesSourceprotected abstract String similarityDescription()
toString().public DoubleValues getValues(LeafReaderContext readerContext, DoubleValues scores) throws IOException
getValues in class DoubleValuesSourceIOExceptionprotected 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 DoubleValuesSourcepublic int hashCode()
hashCode in class DoubleValuesSourcepublic Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) throws IOException
explain in class DoubleValuesSourceIOExceptionpublic boolean isCacheable(LeafReaderContext ctx)
public boolean needsScores()
needsScores in class DoubleValuesSourceCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.