You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/07/04 05:49:33 UTC
[jira] [Created] (LUCENE-5804) Add makeShapeValueSource to
SpatialStrategy
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org