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

add newDistanceSort to sandbox LatLonPoint

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1, 7.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This field does not support sorting by distance, which is a very common use case.

      We can add LatLonPoint.newDistanceSort(field, latitude, longitude) which returns a suitable SortField. There are a lot of optimizations esp when e.g. the priority queue gets full to avoid tons of haversin() computations.

      Also, we can make use of the SortedNumeric data to switch newDistanceQuery/newPolygonQuery to the two-phase iterator api, so they aren't doing haversin() calls on bkd leaf nodes. It should look a lot like LUCENE-7019

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: