[ 
https://issues.apache.org/jira/browse/LUCENE-4419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley updated LUCENE-4419:
---------------------------------

    Attachment: LUCENE-4419_Test_indexing_non-point_shapes.patch

The attached test SpatialOpRecursivePrefixTreeTest tests the 
RecursivePrefixTree extensively.  It yielded the bugs in LUCENE-4585.  It uses 
the QuadPrefixTree with random levels and random scan threshold for 
RecursivePrefixTreeFilter.  Some randomly generated rectangles are asserted as 
a MUST match, and some are optional depending on the grid approximation.

QuadPrefixTree was chosen because it supports non-geo, and this test has some 
simplistic logic in going from shape -> grid-snapped shape that would be more 
complicated in geospatial that ultimately RecursivePrefixTree doesn't care 
about any way -- it's Spatial4j + GeohashPrefixTree that deal with that.

This test added an evaluate() method to SpatialOperation which I found quite 
handy.  With this in place and this test as a template, it should be easy to 
test for operations other than intersect once they are supported.
                
> Test RecursivePrefixTree indexing non-point data
> ------------------------------------------------
>
>                 Key: LUCENE-4419
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4419
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spatial
>            Reporter: David Smiley
>            Assignee: David Smiley
>         Attachments: LUCENE-4419_Test_indexing_non-point_shapes.patch
>
>
> RecursivePrefixTreeFilter was modified in ~July 2011 to support spatial 
> filtering of non-point indexed shapes.  It seems to work when playing with 
> the capability but it isn't tested.  It really needs to be as this is a major 
> feature.
> I imagine an approach in which some randomly generated rectangles are indexed 
> and then a randomly generated rectangle is queried.  The right answer can be 
> calculated brute-force and then compared with the filter.  In order to deal 
> with shape imprecision, the randomly generated shapes could be generated to 
> fit a course grid (e.g. round everything to a 1 degree interval).

--
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to