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

Remove Priority-Queue size trap in MultiTermQuery.TopTermsBooleanQueryRewrite

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: