Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: Build
    • Labels:
      None

      Description

      The calculations of distance appears to be off.

      Note: "The radius of the sphere to be used when calculating distances on a sphere (i.e. haversine). Default is the Earth's mean radius in kilometers (see org.apache.solr.search.function.distance.Constants.EARTH_MEAN_RADIUS_KM) which is set to 3,958.761458084784856. Most applications will not need to set this."

      The radius of the earth in KM is 6371.009 km (≈3958.761 mi).

      Also filtering distance appears to be off - example data:

      45.17614,-93.87341 to 44.9369054,-91.3929348 Approx 137 miles Google. 169 miles = 220 kilometers

      http://....../solr/select?fl=*,score&start=0&rows=10&q=

      {!sfilt%20fl=store_lat_lon}

      &qt=standard&pt=44.9369054,-91.3929348&d=280&sort=dist(2,store,vector(44.9369054,-91.3929348)) asc

      Nothing shows. d=285 shows results. This is off by a lot.

      Bill

      1. solrspatial.xlsx
        10 kB
        Bill Bell
      2. Distance.diff
        2 kB
        Bill Bell
      3. SOLR-2125.patch
        16 kB
        Grant Ingersoll

        Issue Links

          Activity

          Bill Bell created issue -
          Bill Bell made changes -
          Field Original Value New Value
          Link This issue blocks SOLR-1568 [ SOLR-1568 ]
          Grant Ingersoll made changes -
          Assignee Grant Ingersoll [ gsingers ]
          Bill Bell made changes -
          Attachment solrspatial.xlsx [ 12455200 ]
          Bill Bell made changes -
          Attachment Distance.diff [ 12455218 ]
          Bill Bell made changes -
          Attachment Distance.diff [ 12455222 ]
          Bill Bell made changes -
          Attachment Distance.diff [ 12455218 ]
          Bill Bell made changes -
          Comment [ svn diff of changes to support better distance at 45 and 225 degrees

          I am reuploading a new copy. ]
          Grant Ingersoll made changes -
          Attachment SOLR-2125.patch [ 12455269 ]
          Grant Ingersoll made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.1 [ 12314371 ]
          Fix Version/s 4.0 [ 12314992 ]
          Resolution Fixed [ 1 ]
          Grant Ingersoll made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Grant Ingersoll
              Reporter:
              Bill Bell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development