You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2009/09/07 18:06:57 UTC
[jira] Commented: (LUCENE-1894) Spatial checks for a string in an
int,double map
[ https://issues.apache.org/jira/browse/LUCENE-1894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752199#action_12752199 ]
Mark Miller commented on LUCENE-1894:
-------------------------------------
This is from DistanceHandler by the way.
well I give up on this one - apparently, distances holds docIds to distance - not sure why the heck there is an attempt here to use it in this manner.
Not confident in changing it to anything either - the distance test class asserts nothing and just does System outs. And I don't know how the heck distances acts as a cache - no code inserts anything into it. It looks like it can just be used as a user override for pre chosen docs? They fill it and pass it?
Some of this spatial code is kind of hairy - and the tests/javadoc are very sparse. Many methods,constructors are not called anywhere (tests or not). Some are just called from random main methods.
> Spatial checks for a string in an int,double map
> ------------------------------------------------
>
> Key: LUCENE-1894
> URL: https://issues.apache.org/jira/browse/LUCENE-1894
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/spatial
> Reporter: Mark Miller
> Priority: Minor
> Fix For: 2.9
>
>
> {code}
> private Map<Integer,Double> distances;
> {code}
> {code}
> if (precise != null) {
> double xLat = getPrecision(lat, precise);
> double xLng = getPrecision(lng, precise);
>
> String k = new Double(xLat).toString() +","+ new Double(xLng).toString();
>
> Double d = (distances.get(k));
> if (d != null){
> return d.doubleValue();
> }
> }
> {code}
> Something is off here eh?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org