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 2013/07/17 07:12:53 UTC
[jira] [Updated] (LUCENE-5118) spatial strategy- add multiplier to
makeDistanceValueSource()
[ https://issues.apache.org/jira/browse/LUCENE-5118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley updated LUCENE-5118:
---------------------------------
Attachment: LUCENE-5118__multiplier_to_spatial_makeDistanceValueSource.patch
See attached patch. A minor ancillary thing I did was add equals & hashCode to BBox's AreaSimilarity which is important for cacheability of the ValueSource that contains it.
I had second thoughts on deprecating the method without the multiplier so I didn't do that.
What do you think [~ryantxu]?
> spatial strategy- add multiplier to makeDistanceValueSource()
> -------------------------------------------------------------
>
> Key: LUCENE-5118
> URL: https://issues.apache.org/jira/browse/LUCENE-5118
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/spatial
> Reporter: David Smiley
> Assignee: David Smiley
> Fix For: 4.5
>
> Attachments: LUCENE-5118__multiplier_to_spatial_makeDistanceValueSource.patch
>
>
> SpatialStrategy has this abstract method:
> {code}
> /**
> * Make a ValueSource returning the distance between the center of the
> * indexed shape and {@code queryPoint}. If there are multiple indexed shapes
> * then the closest one is chosen.
> */
> public abstract ValueSource makeDistanceValueSource(Point queryPoint);
> {code}
> I'd like to add another argument {{double multiplier}} that is internally multiplied to the result per document. It's a convenience over having the user wrap this with another ValueSource, and it'd be faster too. Typical usage would be to add a degrees-to-kilometers multiplier.
> The current method could be marked deprecated with a default implementation that invokes the new one with a 1.0 multiplier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org