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

Multipolygon query problem with datelineRule=ccwRect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.9
    • 5.0
    • spatial
    • None
    • Windows 7, Oracle JDK 1.7.0_45

    Description

      We are currently upgrading from Solr 4.1 to 4.9 and have observed some odd behavior with multipolygon queries now. It is difficult to describe what is happening so I took a screenshot with the documents and query area plotted on a map. You can see it here: http://imgur.com/iBpYLMh The blue areas represent the multipolygon and the purple areas represent the document footprints.

      The query being used is as follows:

      geo:"Intersects(MULTIPOLYGON(((-3 2,4 2,4 8,-3 8,-3 2)),((-3 -11,4 -11,4 -4,-3 -4,-3 -11))))"

      This query returns all results when it should be returning only 8. If I run two separate queries with each individual polygon, I get 4 hits each as expected.

      I've narrowed this down to a problem with using 'datelineRule=ccwRect'. If I remove this setting, the query returns with the expected results. Unfortunately, this setting is required for our software though, since handling large polygon queries (spanning >180 degrees) are a requirement.

      Here are the relevant schema details:

      <field name="geo" type="location_rpt" indexed="true" stored="false"/>
      <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
      geo="true" distErrPct="0.1" maxDistErr="0.000009" units="degrees"
      datelineRule="ccwRect" normWrapLongitude="true" autoIndex="true"/>

      Attachments

        Activity

          People

            dsmiley David Smiley
            jhines Jon H
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: