Lucene - Core
  1. Lucene - Core
  2. LUCENE-3609

BooleanFilter changed behavior in 3.5, no longer acts as if "minimum should match" set to 1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The change LUCENE-3446 causes a change in behavior in BooleanFilter. It used to work as if minimum should match clauses is 1 (compared to BQ lingo), but now, if no should clauses match, then the should clauses are ignored, and for example, if there is a must clause, only that one will be used and returned.

      For example, a single must clause and should clause, with the should clause not matching anything, should not match anything, but, it will match whatever the must clause matches.

      The fix is simple, after iterating over the should clauses, if the aggregated bitset is null, return null.

      1. LUCENE-3609.patch
        3 kB
        Uwe Schindler
      2. LUCENE-3609.patch
        1.0 kB
        Uwe Schindler
      3. LUCENE-3609.patch
        0.8 kB
        Uwe Schindler

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Shay Banon
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development