lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-996) Parsing mixed inclusive/exclusive range queries
Date Thu, 13 Sep 2007 18:01:51 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527204
] 

Hoss Man commented on LUCENE-996:
---------------------------------


so this changes the query syntax such that foo:{a TO z] and foo:[a TO z} are now legal ...
the querysyntax docs should be modified to mention this in the patch as well.

one hitch: this seems to break backwards compatibility for anyone who has previously subclassed
QueryParser and overridden the getRangeQuery(String, String, String, boolean) method ... if
someone defines that method in their query parser, it will now never be called -- even if
they don't take advantage of the new syntax.

off the top of my head, one way to remain backwards compatible is to have a deprecated getRangeQuery(String,
String, String, boolean) method which does the same thing it currently does, and have the
new getRangeQuery(String, String, String, boolean, boolean) method call it if the booleans
have the same value ... if they don't have the same value then do the new stuff.  document
that people subclassing QueryParser that want to override RangeQueries only need to override
the double boolean method.

> Parsing mixed inclusive/exclusive range queries
> -----------------------------------------------
>
>                 Key: LUCENE-996
>                 URL: https://issues.apache.org/jira/browse/LUCENE-996
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.2
>            Reporter: Andrew Schurman
>            Priority: Minor
>         Attachments: lucene-996.patch
>
>
> The current query parser doesn't handle parsing a range query (i.e. ConstantScoreRangeQuery)
with mixed inclusive/exclusive bounds.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message