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

MultiSearcher.rewrite() incorrectly rewrites queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1, 4.0-ALPHA
    • core/search
    • None
    • New

    Description

      This was reported on the userlist, in the context of range queries.

      Its also easy to make our existing tests fail with my patch on LUCENE-2751:

      ant test-core -Dtestcase=TestBoolean2 -Dtestmethod=testRandomQueries -Dtests.seed=7679849347282878725:-903778383189134045
      

      The fundamental problem is that MultiSearcher first rewrites against individual subs,
      then uses Query.combine() which simply OR's these sub-clauses.

      This is incorrect for expanded MUST_NOT queries (e.g. from wildcard), as it violates demorgan's law.

      Attachments

        1. LUCENE-2756_testcase.patch
          2 kB
          Robert Muir

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: