Lucene - Core
  1. Lucene - Core
  2. LUCENE-6710

GeoPointField should use full 64 bit encoding

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Current GeoPointField uses 31 bits for each lat and long, respectively. This causes a precision error for the maximum bounds for 2D mapping applications (e.g., instead of maximum of 180, 90 the max value handled is 179.999999, 89.999999).

      This issue improves precision for the full 2D map boundaries by using the full 32 bit range for lat/lon values, resulting in a morton hash using the full 64 bit range.

      1. LUCENE-6710.patch
        3 kB
        Michael McCandless
      2. LUCENE-6710.patch
        3 kB
        Nicholas Knize

        Activity

        Hide
        Nicholas Knize added a comment -

        Patch to use full 64 bit precision for morton encoding, unit test included.

        Show
        Nicholas Knize added a comment - Patch to use full 64 bit precision for morton encoding, unit test included.
        Hide
        Michael McCandless added a comment -

        As much as I love BigInteger, it's quite slow and I think that may matter here (it's called 2.8 M times when I run TestGeoPointQuery.testWholeMap).

        How about this patch instead? I just special case the max shift case ...

        Show
        Michael McCandless added a comment - As much as I love BigInteger, it's quite slow and I think that may matter here (it's called 2.8 M times when I run TestGeoPointQuery.testWholeMap). How about this patch instead? I just special case the max shift case ...
        Hide
        Nicholas Knize added a comment -

        ++ LGTM

        Show
        Nicholas Knize added a comment - ++ LGTM
        Hide
        ASF subversion and git services added a comment -

        Commit 1693796 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1693796 ]

        LUCENE-6710: use full 64 bits precision for GeoPointField

        Show
        ASF subversion and git services added a comment - Commit 1693796 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1693796 ] LUCENE-6710 : use full 64 bits precision for GeoPointField
        Hide
        ASF subversion and git services added a comment -

        Commit 1693797 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1693797 ]

        LUCENE-6710: use full 64 bits precision for GeoPointField

        Show
        ASF subversion and git services added a comment - Commit 1693797 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1693797 ] LUCENE-6710 : use full 64 bits precision for GeoPointField
        Hide
        Michael McCandless added a comment -
        Show
        Michael McCandless added a comment - Thanks Nicholas Knize !
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicholas Knize
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development