Lucene - Core
  1. Lucene - Core
  2. LUCENE-6748

The query cache should not cache trivial queries

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The query cache already avoids caching term queries because they are cheap, but it doesn't do it with even cheaper queries like MatchAllDocsQuery.

      1. LUCENE-6748.patch
        2 kB
        Adrien Grand
      2. LUCENE-6748.patch
        1.0 kB
        Adrien Grand

        Issue Links

          Activity

          Hide
          Adrien Grand added a comment -

          Here is a patch.

          Show
          Adrien Grand added a comment - Here is a patch.
          Hide
          Terry Smith added a comment -

          I'd add a case to the patch to include empty DisjunctionMaxQuery instances also.

          Show
          Terry Smith added a comment - I'd add a case to the patch to include empty DisjunctionMaxQuery instances also.
          Hide
          Adrien Grand added a comment -

          Thanks Terry, I updated the patch.

          Show
          Adrien Grand added a comment - Thanks Terry, I updated the patch.
          Hide
          ASF subversion and git services added a comment -

          Commit 1696900 from Adrien Grand in branch 'dev/trunk'
          [ https://svn.apache.org/r1696900 ]

          LUCENE-6748: Never cache MatchAllDocsQuery and other cheap queries.

          Show
          ASF subversion and git services added a comment - Commit 1696900 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1696900 ] LUCENE-6748 : Never cache MatchAllDocsQuery and other cheap queries.
          Hide
          ASF subversion and git services added a comment -

          Commit 1696902 from Adrien Grand in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1696902 ]

          LUCENE-6748: Never cache MatchAllDocsQuery and other cheap queries.

          Show
          ASF subversion and git services added a comment - Commit 1696902 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1696902 ] LUCENE-6748 : Never cache MatchAllDocsQuery and other cheap queries.
          Hide
          ASF subversion and git services added a comment -

          Commit 1701972 from Adrien Grand in branch 'dev/branches/lucene_solr_5_3'
          [ https://svn.apache.org/r1701972 ]

          LUCENE-6781,LUCENE-6748: backport for 5.3.1.

          Show
          ASF subversion and git services added a comment - Commit 1701972 from Adrien Grand in branch 'dev/branches/lucene_solr_5_3' [ https://svn.apache.org/r1701972 ] LUCENE-6781 , LUCENE-6748 : backport for 5.3.1.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development