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

Remove Priority-Queue size trap in MultiTermQuery.TopTermsBooleanQueryRewrite

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1, 4.0-ALPHA
    • 3.1, 4.0-ALPHA
    • core/search
    • None
    • 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

        1. LUCENE-2687.patch
          4 kB
          Robert Muir

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: