lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4550) For extremely wide shapes (> 180 degrees) distErrPct is not used correctly
Date Fri, 09 Nov 2012 16:24:11 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494086#comment-13494086
] 

David Smiley commented on LUCENE-4550:
--------------------------------------

A solution is to calculate the distance from a bbox corner to its center, instead of the current
algorithm which takes half of the distance from opposite corners.  The only small issue to
consider is that the distance from a bbox corner to its center will vary up to ~4x (worse
case) depending on wether you take a top corner or bottom corner, so I could do both and take
the shorter (resulting in a little more accuracy than taking the longer).
                
> For extremely wide shapes (> 180 degrees) distErrPct is not used correctly
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-4550
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4550
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial
>    Affects Versions: 4.0
>            Reporter: David Smiley
>            Priority: Minor
>
> When a shape is given to a PrefixTreeStrategy (index or query time), it needs to know
how many levels down the prefix tree to go for a target precision (distErrPct).  distErrPct
is basically a fraction of the radius of the shape, defaulting to 2.5% (0.0025).
> If the shape presented is extremely wide, > 180 degrees, then the internal calculations
in SpatialArgs.calcDistanceFromErrPct(...) will wrongly measure the shape's size as having
width < 180 degrees, yielding *more* accuracy than intended.  Given that this happens for
unrealistic shape sizes and results in more accuracy, I am flagging this as "minor", but a
bug nonetheless.  Indeed, this was discovered as a result of someone using lucene-spatial
incorrectly, not for an actual shape they have.  But in the extreme \[erroneous\] case they
had, they had 566k terms (!) generated, when it should have been ~1k tops. 

--
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


Mime
View raw message