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)
Implementations should propagate createWeight to sub-ValueSources which can optionally store
weight info in the context.
|
String |
description()
description of field, used in explain()
|
boolean |
equals(Object o) |
FunctionValues |
getValues(Map context,
AtomicReaderContext readerContext)
Gets the values for this reader and the context that was previously
passed to createWeight()
|
int |
hashCode() |
protected abstract double |
score(org.locationtech.spatial4j.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, toStringpublic BBoxSimilarityValueSource(ValueSource bboxValueSource)
public void createWeight(Map context, IndexSearcher searcher) throws IOException
ValueSourcecreateWeight in class ValueSourceIOExceptionpublic String description()
ValueSourcedescription in class ValueSourceprotected abstract String similarityDescription()
description().public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException
ValueSourcegetValues in class ValueSourceIOExceptionprotected abstract double score(org.locationtech.spatial4j.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 ValueSourcepublic int hashCode()
hashCode in class ValueSourceCopyright © 2000–2021 The Apache Software Foundation. All rights reserved.