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

deduplicate/cleanup spatial distance

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.0, 6.1, 7.0
    • None
    • None
    • New

    Description

      Currently there is a bit of a mess here: SloppyMath.haversin is slightly different from GeoDistanceUtils.haversin, the latter is actually slightly faster and uses a simple fixed earth diameter (which makes calculations easier too).

      But one of these returns meters, the other kilometers. Furthermore lucene/spatial now uses some sin/tan functions that were added to sloppymath with some accuracy guarantees (which are untested, and not quite correct). Lucene/spatial queries also inconsistently mix the two different functions together for various purposes and this just causes headaches. Its tests did this recently too.

      We need to clean this up, otherwise users will be confused. E.G. they will see different results from expressions than from queries and not understand.

      Attachments

        1. LUCENE-7123.patch
          65 kB
          Robert Muir
        2. LUCENE-7123.patch
          65 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: