Lucene - Core
  1. Lucene - Core
  2. LUCENE-2687

Remove Priority-Queue size trap in MultiTermQuery.TopTermsBooleanQueryRewrite

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 4.0-ALPHA
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      These APIs are new in 3.x, so we can do this with no backwards-compatibility issue:

      Before 3.1, FuzzyQuery had its own internal rewrite method.
      We exposed this in 3.x as TopTermsBooleanQueryRewrite, and then as subclasses for Scoring and Boost-only variants.

      The problem I have is that the PQ has a default (large) size of Integer.MAX_VALUE... of course its later limited by
      the value of BooleanQuery's maxClauseCount, but I think this is a trap.

      Instead its better to simply remove these defaults and force the user to provide a default (reasonable) size.

        Activity

        Hide
        Robert Muir added a comment -

        all tests pass with the fix.

        Show
        Robert Muir added a comment - all tests pass with the fix.
        Hide
        Robert Muir added a comment -

        Committed revision 1005310, 1005312 (3x)

        Show
        Robert Muir added a comment - Committed revision 1005310, 1005312 (3x)
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development