public abstract class BBoxSimilarityValueSource extends ValueSource
ValueSource
in which FunctionValues.objectVal(int)
returns a Rectangle
.
Implementers: remember to implement equals & 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,
AtomicReaderContext readerContext) |
int |
hashCode() |
protected abstract double |
score(com.spatial4j.core.shape.Rectangle rect,
Explanation exp)
Return a relevancy score.
|
protected abstract String |
similarityDescription()
A comma-separated list of configurable items of the subclass to put into
description() . |
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, AtomicReaderContext readerContext) throws IOException
getValues
in class ValueSource
IOException
protected abstract double score(com.spatial4j.core.shape.Rectangle rect, 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-2014 Apache Software Foundation. All Rights Reserved.