[
https://issues.apache.org/jira/browse/LUCENE-1894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752203#action_12752203
]
Mark Miller commented on LUCENE-1894:
-------------------------------------
Okay - a little insight finally - it looks like the lookup should actually be
on what is called elsewhere, distanceLookupCache - a weakhashmap mapping string
to double. Thats on the DistanceFilter though, and I don't see how its usable
here yet ...
> 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: [email protected]
For additional commands, e-mail: [email protected]