Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15833

Exists query does not work for SRPT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.6.3
    • 9.0, 8.11.1
    • None
    • None

    Description

      @@ -172,6 +173,8 @@ public class TestSolr4Spatial extends SolrTestCaseJ4 {
           checkHits(fieldName, "0,0", 100, DistanceUtils.EARTH_MEAN_RADIUS_KM, 0);//doesn't error
         }
      
      +  @Test public void testExistsQuery() { assertQ(req("q", fieldName + ":*", "fl", "id," + fieldName)); }
      +
         private void checkHits(String fieldName, String pt, double distKM, double sphereRadius, int count, int ... docIds) throws ParseException {
           checkHits(fieldName, true, pt, distKM, sphereRadius, count, docIds);
         }
      

      This test passes against 8.5.0 release and fails when running 8.6.3.

      I initially suspected SOLR-11746, but that doesn't line up with the release info, unless some of that revert/recommit stuff came in later.

      This error happens because the exists query for spatial types gets turned into a range query with inclusive null bounds, which then causes the bounding box parsing to fail. And generating the exception incidentally fails because we try to pass a null argument to String.contains!

      Some options for solving this:

      • See null bounds when creating our shape and return a new shape that matches everything
      • Go back to using a prefix query
      • Find some other extra "clever" data like norms that the field leaves around

      We might also need to check additional fields for this same behavior.

      Attachments

        Activity

          People

            mdrob Mike Drob
            mdrob Mike Drob
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h