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

Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • None
    • core/queryparser
    • None
    • New, Patch Available

    Description

      Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
      for range queries. This implementation is generally preferable because it
      a) Runs faster
      b) Does not have the scarcity of range terms unduly influence score
      c) avoids any "TooManyBooleanClauses" exception.

      However, if applications really need to use the old-fashioned RangeQuery and the above
      points are not required then the "useOldRangeQuery" property can be used to revert to old behaviour.

      The patch includes extra Junit tests for this flag and all other Junit tests pass

      Attachments

        1. patch.diff
          5 kB
          Mark Harwood

        Activity

          People

            Unassigned Unassigned
            mharwood Mark Harwood
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: