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

David Smiley updated LUCENE-4794:
---------------------------------

    Attachment: LUCENE-4794_Spatial_PrefixTree_traversal_abstraction.patch

Patch summary:
* IntersectsPrefixTreeFilter: replaces RecursivePrefixTreeFilter but has little 
code since most logic is in its superclass now.
* AbstractVisitingPrefixTreeFilter: Most of the former logic is here, with 
extensibility hooks.
** A new optimization that skips calls to seek() when the cell is known to 
precede the next term.
** The former stack / LinkedList is now a tree structure using inner class 
"VNode".  Not really leveraged yet.
* AbstractPrefixTreeFilter: The superclass of AbstractVisitingPrefixTreeFilter 
-- doesn't do much but hold essential state & implement equals & hashCode. 
Arguably isn't needed as separate but is useful for a Contains algorithm (not 
present, will follow in a few weeks) that doesn't use  
AbstractVisitingPrefixTreeFilter.
* tree/Node.java: decoupled shapeRel & isLeaf into separate fields instead of 
isLeaf being true IFF shapeRel==WITHIN.  This is a small thing unrelated to the 
rest.

The tests pass.  I'll commit in a few days if there is no feedback.
                
> Refactor Spatial RecursivePrefixTreeFilter algorithm for extension
> ------------------------------------------------------------------
>
>                 Key: LUCENE-4794
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4794
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spatial
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 4.2, 5.0
>
>         Attachments: 
> LUCENE-4794_Spatial_PrefixTree_traversal_abstraction.patch
>
>
> In the process of implementing algorithms on the SpatialPrefixTree indexed 
> field like "Within" or some variations of Intersects that say collect the 
> distance as side-effect, I find that I need near-copies of the code in 
> RecursivePrefixTreeFilter.  RPTF is pretty intense with lots of 
> optimizations.  So I refactored out the algorithm such that it makes 
> implementing new algorithms much easier yet benefits from the logic in there.
> Patch to follow...

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