[ https://issues.apache.org/jira/browse/LUCENE-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738298#action_12738298 ]
Michael McCandless commented on LUCENE-1777: -------------------------------------------- bq. Actually there is already a floor on boxes level which cannot be > 15 in the bestFit function. Ahh OK. And from the comment in the code: {quote} if (bestFit > 15) { // 15 is the granularity of about 1 mile // finer granularity isn't accurate with standard java math return 15; } {code} It looks like 1 mile is the "natural" floor given Java's math... so I think we should 1) switch miles to double, but 2) enforce a floor of 1.0, carrying over this comment from bestFit to where that floor is enforced. I'll make those changes under LUCENE-1504. > Error on distance query where miles < 1.0 > ----------------------------------------- > > Key: LUCENE-1777 > URL: https://issues.apache.org/jira/browse/LUCENE-1777 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/spatial > Affects Versions: 2.9 > Reporter: Glen Stampoultzis > Attachments: LUCENE-1777.patch > > > If miles is under 1.0 distance query will break. > To reproduce modify the file > http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java?revision=794721 > And set the line: > final double miles = 6.0; > to > final double miles = 0.5; -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org