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

        Robert Muir created issue -
        Hide
        Robert Muir added a comment -

        all tests pass with the fix.

        Show
        Robert Muir added a comment - all tests pass with the fix.
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-2687.patch [ 12456310 ]
        Hide
        Robert Muir added a comment -

        Committed revision 1005310, 1005312 (3x)

        Show
        Robert Muir added a comment - Committed revision 1005310, 1005312 (3x)
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Robert Muir [ rcmuir ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12522203 ] Default workflow, editable Closed status [ 12563620 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563620 ] jira [ 12585196 ]
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 5h 45m 1 Robert Muir 07/Oct/10 01:47
        Resolved Resolved Closed Closed
        174d 14h 2m 1 Grant Ingersoll 30/Mar/11 15:50

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development