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

BooleanQuery rewrite optimizations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 7.0
    • 7.0
    • core/search
    • None
    • New, Patch Available

    Description

      A couple of BooleanQuery rewrites / optimizations.

      First, as discussed on the user group, a BooleanQuery with a query that is both a SHOULD and a FILTER can be rewritten as a single MUST query, but care must be taken to decrement minShouldMatch by 1.

      Another case is if a query is both required (MUST or FILTER) and MUST_NOT at the same time, it can be converted to a MatchNoDocsQuery (although I haven't discussed this yet so hopefully I'm not missing something!).

      Attachments

        1. LUCENE-7146.patch
          6 kB
          Spyros Kapnissis
        2. LUCENE-7146-MatchAllMustNot.patch
          4 kB
          Uwe Schindler
        3. LUCENE-7146-simplific1.patch
          1 kB
          Uwe Schindler
        4. LUCENE-7146-simplific1.patch
          1 kB
          Uwe Schindler

        Issue Links

          Activity

            People

              Unassigned Unassigned
              spyk Spyros Kapnissis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: