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

NumericRange support for new query parser



    • Lucene Fields:


      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.


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

          Issue Links



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


                • Created: