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

MultiSearcher.rewrite() incorrectly rewrites queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: