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

Spatial PrefixTreeStrategy shouldn't index center-points with shapes together

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0, 6.0
    • 4.1, 6.0
    • modules/spatial
    • None
    • New

    Description

      The Spatial PrefixTreeStrategy will index the center-point of a non-point shape it is given to index, in addition to the shape itself of course. The rationale was that this point could be picked up by PointPrefixTreeFieldCacheProvider for distance/sorting. However this approach is buggy since the distinction of grid cells between the center point and the shape itself is lost when the shape gets indexed down to max-levels precision – each grid cell therein appears to be another point that needs to be brought into memory. It's also possible that the shape is a LineString or some other non-trivial shape in which its center point isn't actually in the shape.

      Even if you knew this problem would never happen, I think you're better off indexing center points into another spatial field if you want them. Perhaps arguably this strategy could do that internally? Wether or not that ends up happening, I just want to remove the problematic behavior now.

      Attachments

        Activity

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: