public abstract class BBoxSimilarityValueSource extends ValueSource
ValueSource
in which FunctionValues.objectVal(int)
returns a Rectangle
.
Implementers: remember to implement equals and hashCode if you have fields!
Constructor and Description |
---|
BBoxSimilarityValueSource(ValueSource bboxValueSource) |
Modifier and Type | Method and Description |
---|---|
void |
createWeight(Map context,
IndexSearcher searcher) |
String |
description() |
boolean |
equals(Object o) |
FunctionValues |
getValues(Map context,
LeafReaderContext readerContext) |
int |
hashCode() |
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
description() . |
asDoubleValuesSource, asLongValuesSource, getSortField, newContext, toString
public BBoxSimilarityValueSource(ValueSource bboxValueSource)
public void createWeight(Map context, IndexSearcher searcher) throws IOException
createWeight
in class ValueSource
IOException
public String description()
description
in class ValueSource
protected abstract String similarityDescription()
description()
.public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException
getValues
in class ValueSource
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 ValueSource
public int hashCode()
hashCode
in class ValueSource
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.