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

ASF subversion and git services commented on LUCENE-7821:
---------------------------------------------------------

Commit e11bc030987b33faadf42f0b2fb21d521077f361 in lucene-solr's branch 
refs/heads/master from [~steve_rowe]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e11bc03 ]

LUCENE-7821: The classic and flexible query parsers, as well as Solr's 
'lucene'/standard query parser, should require ' TO ' in range queries, and 
accept 'TO' as endpoints in range queries.


> Classic, flexible, and Solr's standard/"lucene" query parsers: range queries 
> should require " TO ", and accept TO as range endpoints
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7821
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7821
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Hoss Man
>            Assignee: Steve Rowe
>         Attachments: LUCENE-7821.patch, LUCENE-7821.patch
>
>
> A post on the solr-user mailing list drew my attention to the fact that this 
> is apparently a valid range query under the QueryParser.jj grammer (both for 
> the classic parser and the solr variant -- i didn't check flexible)...
> {noformat}
> [x z]       // parsed the same as [x TO z]
> {noformat}
> it's parsed as a valid range query even though there is no {{ TO }} -- even 
> though there is nothing in the docs to suggest that the {{ TO }} is intended 
> to be optional.
> Furthermore, in my experimenting i realized that how the grammer looks for 
> the {{ TO }} keyword seems to be a bit sloppy, making some range queries that 
> should be easy to validate (because they are unambiguous) fail to parse...
> {noformat}
> [TO TO z]     // fails
> [a TO TO]     // fails
> [a TO "TO"]   // works, but why should quoting be neccessary here?
> {noformat}
> ----
> If the "sloppy" parsing behavior is intentional, then the docs should reflect 
> that the {{ TO }} is optional -- but it seems like in general we should make 
> these other unambiguous cases parse cleanly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to