David Smiley created LUCENE-5804:
------------------------------------
Summary: Add makeShapeValueSource to SpatialStrategy
Key: LUCENE-5804
URL: https://issues.apache.org/jira/browse/LUCENE-5804
Project: Lucene - Core
Issue Type: Improvement
Components: modules/spatial
Reporter: David Smiley
The notion of a ValueSource that yields a Shape from
FunctionValues.objectVal(docId) was introduced with SerializedDVStrategy, and I
rather like it. I think the base SpatialStrategy abstraction should be amended
with it. In addition, a marker class "ShapeValueSource" that simply extends
ValueSource would clarify when/where these special value sources are used with
a bit of type safety.
{code:java}
/**
* Provides access to a Shape per document via ValueSource in which
* {@link org.apache.lucene.queries.function.FunctionValues#objectVal(int)}
returns a {@link
* Shape}.
*/
public ShapeValueSource makeShapeValueSource() {
throw new UnsupportedOperationException();
}
//(use existing javadocs)
public ValueSource makeDistanceValueSource(Point queryPoint, double
multiplier) {
return new DistanceToShapeValueSource(makeShapeValueSource(), queryPoint,
multiplier, ctx);
}
{code}
SerializedDVStrategy & BBoxStrategy would use this; PointVectorStrategy could
be modified to.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]