[
https://issues.apache.org/jira/browse/LUCENE-4644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated LUCENE-4644:
---------------------------------
Attachment:
LUCENE-4644_Spatial_Within_predicate_for_RecursivePrefixTree.patch
Attached is a patch that implements a spatial "Within" predicate for
RecursivePrefixTree.
Summary of changes in patch, which includes some unrelated things:
* Added SpatialPrefixTree.getDistanceForLevel(level):double -- used by the
Within filter to help it 'buffer' the query shape slightly
* Migrated AbstractPrefixTreeFilter to use FixedBitSet instead of OpenBitSet,
because FBS is preferred in Lucene (paraphrasing Uwe)
* Moved some point vs rect interpretation of a cell from
AbstractVisitingPrefixTreeFilter to subclass IntersectsPrefixTreeFilter since
that logic is not applicable to Within
The test is randomized and thus fairly thorough, notwithstanding that it
doesn't test a geospatial context. I'd like to add that but in order to do so,
gridSnap would ideally use some utility classes/logic in Spatial4j trunk that
isn't here. So I'll add that in the future.
The big thing missing here is that this Within predicate will sometimes match
false-positives in cases where the indexed shape for a document is really
multi* shape -- i.e. is composed of multiple disjoint parts. I'd like to solve
that separately using some sort of indexed field of center points of each
disjoint part of indexed shapes. Maybe as a separate issue? But it would be
nice to get this committed now, notwithstanding this interim limitation.
> Implement spatial WITHIN query for RecursivePrefixTree
> ------------------------------------------------------
>
> Key: LUCENE-4644
> URL: https://issues.apache.org/jira/browse/LUCENE-4644
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/spatial
> Reporter: David Smiley
> Assignee: David Smiley
> Attachments:
> LUCENE-4644_Spatial_Within_predicate_for_RecursivePrefixTree.patch
>
>
--
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: [email protected]
For additional commands, e-mail: [email protected]