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

Hoss Man commented on SOLR-4538:
--------------------------------

This is so weird.  Somehow the query parser is deciding to ignore the last N 
chars of the string, where N can vary depending on the string.  in the examples 
posted to this issue so far, it just so happens that N winds up being the exact 
length of the last clause in the math, but in other cases you'll get an invalid 
date math expression which causes an error..

{noformat}
http://localhost:8983/solr/select?q=foo_tdt:%222013-03-10T08:00:00Z/MONTH%2B6MONTHS%22
Invalid Date Math String:'2013-03-10T08:00:00Z/MONTH+6MONT'

http://localhost:8983/solr/select?q=foooooo_tdt:%222013-03-10T08:00:00Z/MONTH%2B6MONTHS%22
Invalid Date Math String:'2013-03-10T08:00:00Z/MONTH+6MONT'

http://localhost:8983/solr/select?debug=query&q=foo_tdt:2013-03-10T08\:00\:00.1Z/MONTH%2B6MONTHS%2B1DAY
Invalid Date Math String:'2013-03-10T08:00:00.1Z/MONTH+6MO'

http://localhost:8983/solr/select?debug=query&q=foo_tdt:2013-03-10T08\:00\:00.123Z/MONTH%2B6MONTHS%2B1DAY
Invalid Date Math String:'2013-03-10T08:00:00.123Z/MONTH+6'

http://localhost:8983/solr/select?debug=query&q=foo_tdt:%222013-03-10T08:00:00Z/MINUTE%2B6MONTHS%22
Invalid Date Math String:'2013-03-10T08:00:00Z/MINUTE+6MON'

http://localhost:8983/solr/select?debug=query&q=foo_tdt:%222013-03-10T08:00:00.1Z/MINUTE%2B6MONTHS%22
Invalid Date Math String:'2013-03-10T08:00:00.1Z/MINUTE+6M'
{noformat}

(all URLs using Solr 4.1.0 with example configs)
                
> DateMathParser doesn't work correctly.
> --------------------------------------
>
>                 Key: SOLR-4538
>                 URL: https://issues.apache.org/jira/browse/SOLR-4538
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.1
>            Reporter: Minoru Osuka
>
> DateMathParser doesn't work correctly.
> http://lucene.apache.org/solr/4_1_0/solr-core/org/apache/solr/util/DateMathParser.html
> fq=last_modified:"2013-03-08T00:46:15Z/DAY+6MONTHS+3DAYS"
> expected; last_modified:2013-09-11T00:00:00Z
> actual; last_modified:2013-09-08T00:00:00Z

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to