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

LatLonPointDistanceQuery could skip distance computations more often

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0, 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently the logic that check whether all points of a box are within the circle does not take longitude wrapping into account. As a consequence, if you run a distance query whose circle crosses the dateline, we might be performing LOTs of distance computations.

        Activity

        Hide
        jpountz Adrien Grand added a comment -

        Here is a patch. The IndexAndSearchOpenstreetMaps benchmark as-is does not show any change in QPS, which is expected since it only indexes points and performs queries around London, so at least this change is not making things slower. But I hacked the benchmark to add 180 to all longitudes in documents/queries and the QPS went from 17 to 39 with this patch.

        Show
        jpountz Adrien Grand added a comment - Here is a patch. The IndexAndSearchOpenstreetMaps benchmark as-is does not show any change in QPS, which is expected since it only indexes points and performs queries around London, so at least this change is not making things slower. But I hacked the benchmark to add 180 to all longitudes in documents/queries and the QPS went from 17 to 39 with this patch.
        Hide
        mikemccand Michael McCandless added a comment -

        +1, nice catch!

        Show
        mikemccand Michael McCandless added a comment - +1, nice catch!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1332f0f05b265879073f2879b67da9172b7f203b in lucene-solr's branch refs/heads/branch_6x from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1332f0f ]

        LUCENE-7660: LatLonPointDistanceQuery could skip distance computations more often.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1332f0f05b265879073f2879b67da9172b7f203b in lucene-solr's branch refs/heads/branch_6x from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1332f0f ] LUCENE-7660 : LatLonPointDistanceQuery could skip distance computations more often.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 076662d1b23414b94e332206dd7ff73e8d9f9d0b in lucene-solr's branch refs/heads/master from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=076662d ]

        LUCENE-7660: LatLonPointDistanceQuery could skip distance computations more often.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 076662d1b23414b94e332206dd7ff73e8d9f9d0b in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=076662d ] LUCENE-7660 : LatLonPointDistanceQuery could skip distance computations more often.

          People

          • Assignee:
            Unassigned
            Reporter:
            jpountz Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development