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

Optimize the "everything matches" case for point range queries

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Now that points have a getDocCount statistic, we could optimize execution of range queries in the case that the range's lower bound is less that the field's min value and the range's upper bound is greater than the field's max value.

      I would expect such an optimization to kick in frequently for users who store time series in their indices as it is quite frequent for ranges to cover entire segments or even entire indices.

      1. LUCENE-7066.patch
        10 kB
        Adrien Grand

        Activity

        Hide
        jpountz Adrien Grand added a comment -

        Here is a patch.

        Show
        jpountz Adrien Grand added a comment - Here is a patch.
        Hide
        rcmuir Robert Muir added a comment -

        +1

        Show
        rcmuir Robert Muir added a comment - +1
        Hide
        mikemccand Michael McCandless added a comment -

        +1, nice opto, and thank you for factoring out the massive visitor

        Show
        mikemccand Michael McCandless added a comment - +1, nice opto, and thank you for factoring out the massive visitor
        Hide
        jpountz Adrien Grand added a comment -

        Any opinions about whether this should go to 6.0? cc Nicholas Knize

        Show
        jpountz Adrien Grand added a comment - Any opinions about whether this should go to 6.0? cc Nicholas Knize
        Hide
        nknize Nicholas Knize added a comment - - edited

        Adrien Grand I think this is an important optimization for any numeric index with low variance - which is more common than not. The patch LGTM, and since PointValues are a big feature for this release I'd rather see the improvement make it now than wait.

        Show
        nknize Nicholas Knize added a comment - - edited Adrien Grand I think this is an important optimization for any numeric index with low variance - which is more common than not. The patch LGTM, and since PointValues are a big feature for this release I'd rather see the improvement make it now than wait.
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-7066: Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.

        Show
        jira-bot ASF subversion and git services added a comment - Commit e695b0ae07b6f9c1cf7f0d2dc97e41e2ab25e58f in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e695b0a ] LUCENE-7066 : Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 8c36347928efd20977acc120690ab5f8d5ccd4b7 in lucene-solr's branch refs/heads/branch_6_0 from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c36347 ]

        LUCENE-7066: Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 8c36347928efd20977acc120690ab5f8d5ccd4b7 in lucene-solr's branch refs/heads/branch_6_0 from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c36347 ] LUCENE-7066 : Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 9413b42d7be4dafd7ccafaacc5563871c6ebb0dd 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=9413b42 ]

        LUCENE-7066: Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 9413b42d7be4dafd7ccafaacc5563871c6ebb0dd 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=9413b42 ] LUCENE-7066 : Optimize PointRangeQuery for the case that all documents have a value and all points from the segment match.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development