lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adriano Crestani (JIRA)" <>
Subject [jira] [Commented] (LUCENE-1768) NumericRange support for new query parser
Date Tue, 09 Aug 2011 03:36:27 GMT


Adriano Crestani commented on LUCENE-1768:

Good point, should flexible query parser be using version? The changes below might break users'

- processor pipeline configuration changes: any change on the configuration may affect the
query node tree result. If the user has created it's own query builder (or somehow extended/modified
the current builder), changes to what the processor pipeline outputs might break user's code.

- syntax parser changes: if the syntax parser starts outputting a different query node tree
it may break any user processor or builder

- whenever a builder is expecting XQueryNode and then in a later version is expects YQueryNode
as input

The question is: should we support versioning for the above changes or should we only document
the changes and let the user be aware of such change?

I think we should be very careful and only use Version when it's really required (like things
that imply in index changes). So I vote for only documenting the change and also try to avoid
changes that will change the code behavior.

I see the classic QP only uses version to change the default value for certain instance attributes
between 2.9/3.0 and 3.x versions. I think it's only there because 2.9 and 3.0 were required
to be the same, except removed deprecations. I don't think 4.0 will have the same requirement,
will it?

> NumericRange support for new query parser
> -----------------------------------------
>                 Key: LUCENE-1768
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: core/queryparser
>    Affects Versions: 2.9
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>              Labels: contrib, gsoc, gsoc2011, lucene-gsoc-11, mentor
>             Fix For: 4.0
>         Attachments: TestNumericQueryParser-fix.patch, TestNumericQueryParser-fix.patch,
TestNumericQueryParser-fix.patch, TestNumericQueryParser-fix.patch, week-7.patch, week-8.patch,
week1.patch, week2.patch, week3.patch, week4.patch, week5-6.patch
> 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.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message