Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5579

Spatial, enhance RPT to differentiate confirmed from non-confirmed hits, then validate with SDV


    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2
    • Component/s: modules/spatial
    • Labels:
    • Lucene Fields:
      New, Patch Available


      If a cell is within the query shape (doesn't straddle the edge), then you can be sure that all documents it matches are a confirmed hit. But if some documents are only on the edge cells, then those documents could be validated against SerializedDVStrategy for precise spatial search. This should be much faster than using RPT and SerializedDVStrategy independently on the same search, particularly when a lot of documents match.

      Perhaps this'll be a new RPT subclass, or maybe an optional configuration of RPT. This issue is just for the Intersects predicate, which will apply to Disjoint. Until resolved in other issues, the other predicates can be handled in a naive/slow way by creating a filter that combines RPT's filter and SerializedDVStrategy's filter using BitsFilteredDocIdSet.

      One thing I'm not sure of is how to expose to Lucene-spatial users the underlying functionality such that they can put other query/filters in-between RPT and the SerializedDVStrategy. Maybe that'll be done by simply ensuring the predicate filters have this capability and are public.

      It would be ideal to implement this capability after the PrefixTree term encoding is modified to differentiate edge leaf-cells from non-edge leaf cells. This distinction will allow the code here to make more confirmed matches.


        1. LUCENE-5579_CompositeSpatialStrategy.patch
          50 kB
          David Smiley
        2. LUCENE-5579_CompositeSpatialStrategy.patch
          40 kB
          David Smiley
        3. LUCENE-5579_SPT_leaf_covered.patch
          24 kB
          David Smiley
        4. spatial.alg
          4 kB
          David Smiley

          Issue Links



              • Assignee:
                dsmiley David Smiley
                dsmiley David Smiley
              • Votes:
                1 Vote for this issue
                7 Start watching this issue


                • Created: