Lucene - Core
  1. Lucene - Core
  2. LUCENE-2306

contrib/xml-query-parser: NumericRangeQuery and -Filter support

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1
    • Component/s: modules/other
    • Labels:
      None

      Description

      Create a FilterBuilder for NumericRangeFilter so that it may be used with the XML query parser.

      1. LUCENE-2306.patch
        19 kB
        Jingkei Ly
      2. LUCENE-2306.patch
        39 kB
        Jingkei Ly

        Activity

        Hide
        Jingkei Ly added a comment -

        Attached patch

        Show
        Jingkei Ly added a comment - Attached patch
        Hide
        Uwe Schindler added a comment -

        Would it be also possible to alternatively create a NumericRangeQuery?

        Show
        Uwe Schindler added a comment - Would it be also possible to alternatively create a NumericRangeQuery?
        Hide
        Jingkei Ly added a comment -

        Updated patch to include a QueryBuilder for NumericRangeQuery.

        I also forgot to update CoreParser in the original patch, this is now fixed.

        Show
        Jingkei Ly added a comment - Updated patch to include a QueryBuilder for NumericRangeQuery. I also forgot to update CoreParser in the original patch, this is now fixed.
        Hide
        Mark Harwood added a comment -

        Committed in revision 928114

        Show
        Mark Harwood added a comment - Committed in revision 928114
        Hide
        Uwe Schindler added a comment -

        A few tests are in a "com.apache.lucene" package and corresponding folder. This is somehow incorrect.

        Show
        Uwe Schindler added a comment - A few tests are in a "com.apache.lucene" package and corresponding folder. This is somehow incorrect.
        Hide
        Uwe Schindler added a comment -

        I fixed this here locally. Also the builder tests had wrong class names and were not run by ant test. Should I commit?

        Show
        Uwe Schindler added a comment - I fixed this here locally. Also the builder tests had wrong class names and were not run by ant test. Should I commit?
        Hide
        Uwe Schindler added a comment -

        I will commit my changes to the package names and a missing super.tearDown() soon.

        But I found one other thing:
        NRQ allows one or both of the bounds to be null (like TermRangeQuery). But the builder enforces both attributes to be present.

        Also I dont like the default type of "int", I would instead enforce the type. Will post a patch soon.

        Show
        Uwe Schindler added a comment - I will commit my changes to the package names and a missing super.tearDown() soon. But I found one other thing: NRQ allows one or both of the bounds to be null (like TermRangeQuery). But the builder enforces both attributes to be present. Also I dont like the default type of "int", I would instead enforce the type. Will post a patch soon.
        Hide
        Mark Harwood added a comment -

        Should I commit?

        Yes, thanks, Uwe. Missed that test/package.
        Cheers
        Mark

        Show
        Mark Harwood added a comment - Should I commit? Yes, thanks, Uwe. Missed that test/package. Cheers Mark
        Hide
        Uwe Schindler added a comment -

        Committed package and test fixes in revision: 928177

        Show
        Uwe Schindler added a comment - Committed package and test fixes in revision: 928177
        Hide
        Mark Harwood added a comment -

        FYI, re changes to defaults. I try to keep the DTD up to date with all these changes.
        Having done that I then have to manually run the dtdocbuild to generate nice HTML docs . This is currently not automated because of uncertainty about dragging dtddoc and dependencies into lucene builds.
        It's a bit of a pain but html docs are useful and I'm hoping to add smart dtd-driven query entry into Luke.

        Show
        Mark Harwood added a comment - FYI, re changes to defaults. I try to keep the DTD up to date with all these changes. Having done that I then have to manually run the dtdocbuild to generate nice HTML docs . This is currently not automated because of uncertainty about dragging dtddoc and dependencies into lucene builds. It's a bit of a pain but html docs are useful and I'm hoping to add smart dtd-driven query entry into Luke.

          People

          • Assignee:
            Mark Harwood
            Reporter:
            Jingkei Ly
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development