Lucene - Core
  1. Lucene - Core
  2. LUCENE-5132

Spatial RPT CONTAINS predicate will fail with NPE when there's no indexed data

    Details

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

      Description

      If there is no indexed spatial data, the SpatialRecursivePrefixTree strategy will fail with an NPE if the Contains predicate is used. I'm not certain but it might fail even when there is data, when termsEnum reaches the end.

      (bug found via randomized testing & continuous integration)

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1507397 from David Smiley in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1507397 ]

        LUCENE-5132: Spatial RPT Contains predicate can throw NPE

        Show
        ASF subversion and git services added a comment - Commit 1507397 from David Smiley in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1507397 ] LUCENE-5132 : Spatial RPT Contains predicate can throw NPE
        Hide
        ASF subversion and git services added a comment -

        Commit 1506812 from David Smiley in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1506812 ]

        LUCENE-5132: Spatial RPT Contains predicate can throw NPE

        Show
        ASF subversion and git services added a comment - Commit 1506812 from David Smiley in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1506812 ] LUCENE-5132 : Spatial RPT Contains predicate can throw NPE
        Hide
        ASF subversion and git services added a comment -

        Commit 1506811 from David Smiley in branch 'dev/trunk'
        [ https://svn.apache.org/r1506811 ]

        LUCENE-5132: Spatial RPT Contains predicate can throw NPE

        Show
        ASF subversion and git services added a comment - Commit 1506811 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1506811 ] LUCENE-5132 : Spatial RPT Contains predicate can throw NPE
        Hide
        David Smiley added a comment -

        The attached patch tests for the no-indexed-data case for all predicates, and it fixes the bug in RPT's Contains filter.

        I'm going to commit the bug fix momentarily.

        Show
        David Smiley added a comment - The attached patch tests for the no-indexed-data case for all predicates, and it fixes the bug in RPT's Contains filter. I'm going to commit the bug fix momentarily.

          People

          • Assignee:
            David Smiley
            Reporter:
            David Smiley
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development