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

Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      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

            • Assignee:
              Unassigned
              Reporter:
              markh Mark Harwood
            • Votes:
              3 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: