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

David Smiley commented on LUCENE-4644:
--------------------------------------

Do you understand why the default WITHIN semantics (as described in the first 
comment) will be pretty slow?  Do you have any other ideas beyond my 
term->docids cache proposal to speed this up?  If we can assume (with a boolean 
configurable flag) that most docs will have only one part to it (e.g. isn't a 
MULTI*) then perhaps there is an optimization we could make.  Oh I know.  So 
internally we could do the faster "Some WITHIN" algorithm to get the matching 
docIds, but these are then candidates that we have to figure out which of these 
should be removed because they have other parts outside of the query shape.  If 
we index in another field the set of center points of each disjoint part, 
stored via DocValues, then we have a fast method to weed out the false 
positives.  It just needs to iterate over the candidate docIds, fetch its 
center-points array, and if there is more than one entry then see if any are 
outside of the query shape. If there is one then remove the doc from the result.
                
> 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
>


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

Reply via email to