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

add newDistanceSort to sandbox LatLonPoint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.1, 7.0
    • None
    • None
    • 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

        1. LUCENE-7099.patch
          24 kB
          Robert Muir

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: