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

Support open-ended NumericRangeQuery in XmlQueryParser

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • None
    • modules/queryparser
    • None
    • New

    Description

      There is no way to specify an open-ended numeric range query using the XML query parser syntax. To be consistent with the usage in the NumericRangeQuery API, which accepts <code>null</code> as an indicator of a missing range endpoint, I propose interpreting an empty or missing <code>lower</code> or <code>upper</code> attribute in the XML syntax in the same way.

      Attachments

        1. LUCENE-5074.patch
          6 kB
          Michael Sokolov
        2. LUCENE-5074.patch
          3 kB
          Michael Sokolov

        Activity

          This patch adds support for missing and empty lower/upper attributes

          sokolov Michael Sokolov added a comment - This patch adds support for missing and empty lower/upper attributes
          uschindler Uwe Schindler added a comment -

          TermRangeFilter also supports null ends! Maybe make it consistent?

          uschindler Uwe Schindler added a comment - TermRangeFilter also supports null ends! Maybe make it consistent?

          Uwe, I believe RangeFilterBuilder already handles null ends. I have various other local mods that I could submit if there is interest: RangeQueryBuilder seems to be missing? Also I have a RegexpQueryBuilder I could contribute. In the interests of consistency, I'm including similar null-accepting patches for NumericRangeFilterBuilder (exactly like QueryBuilder), but I haven't added RangeQueryBuilder or RegexpQueryBuilder here - seems like a separate issue.

          sokolov Michael Sokolov added a comment - Uwe, I believe RangeFilterBuilder already handles null ends. I have various other local mods that I could submit if there is interest: RangeQueryBuilder seems to be missing? Also I have a RegexpQueryBuilder I could contribute. In the interests of consistency, I'm including similar null-accepting patches for NumericRangeFilterBuilder (exactly like QueryBuilder), but I haven't added RangeQueryBuilder or RegexpQueryBuilder here - seems like a separate issue.

          updated patch to include null endpoint support in NumericRangeFilterBuilder

          sokolov Michael Sokolov added a comment - updated patch to include null endpoint support in NumericRangeFilterBuilder

          These classes no longer exist, and their replacements handle nulls as open-ended ranges.

          sokolov Michael Sokolov added a comment - These classes no longer exist, and their replacements handle nulls as open-ended ranges.
          tomoko Tomoko Uchida added a comment -

          This issue was moved to GitHub issue: #6138.

          tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #6138 .

          People

            Unassigned Unassigned
            sokolov Michael Sokolov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: