Details

    • New

    Description

      It would be good to specify some type of "schema" for the query parser in future, to automatically create NumericRangeQuery for different numeric types? It would then be possible to index a numeric value (double,float,long,int) using NumericField and then the query parser knows, which type of field this is and so it correctly creates a NumericRangeQuery for strings like "[1.567..*]" or "(1.787..19.5]".

      There is currently no way to extract if a field is numeric from the index, so the user will have to configure the FieldConfig objects in the ConfigHandler. But if this is done, it will not be that difficult to implement the rest.

      The only difference between the current handling of RangeQuery is then the instantiation of the correct Query type and conversion of the entered numeric values (simple Number.valueOf(...) cast of the user entered numbers). Evenerything else is identical, NumericRangeQuery also supports the MTQ rewrite modes (as it is a MTQ).

      Another thing is a change in Date semantics. There are some strange flags in the current parser that tells it how to handle dates.

      Attachments

        1. TestNumericQueryParser-fix.patch
          10 kB
          Uwe Schindler
        2. TestNumericQueryParser-fix.patch
          9 kB
          Uwe Schindler
        3. TestNumericQueryParser-fix.patch
          8 kB
          Uwe Schindler
        4. TestNumericQueryParser-fix.patch
          6 kB
          Vinicius Barros
        5. week1.patch
          24 kB
          Vinicius Barros
        6. week11-13_for_lucene_3x.patch
          108 kB
          Uwe Schindler
        7. week11-13_for_lucene_3x.patch
          102 kB
          Vinicius Barros
        8. week-14.patch
          61 kB
          Vinicius Barros
        9. week15_for_lucene_3x.patch
          2 kB
          Vinicius Barros
        10. week15_for_trunk.patch
          61 kB
          Vinicius Barros
        11. week2.patch
          39 kB
          Vinicius Barros
        12. week3.patch
          76 kB
          Vinicius Barros
        13. week4.patch
          82 kB
          Vinicius Barros
        14. week5-6.patch
          108 kB
          Vinicius Barros
        15. week-7.patch
          97 kB
          Vinicius Barros
        16. week-8.patch
          29 kB
          Vinicius Barros

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              uschindler Uwe Schindler
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment