lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Commit Tag Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4538) DateMath strings truncated to 32 chars by lucene qparser in simple term queries
Date Mon, 11 Mar 2013 22:05:14 GMT

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

Commit Tag Bot commented on SOLR-4538:
--------------------------------------

[branch_4x commit] Chris M. Hostetter
http://svn.apache.org/viewvc?view=revision&revision=1455348

SOLR-4538: Date Math expressions were being truncated to 32 characters when used in field:value
queries in the lucene QParser (merge r1455269)

                
> DateMath strings truncated to 32 chars by lucene qparser in simple term queries
> -------------------------------------------------------------------------------
>
>                 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
>            Assignee: Hoss Man
>             Fix For: 4.3
>
>         Attachments: SOLR-4538.patch, SOLR-4538.patch, SOLR-4538_test.patch
>
>
> When using the "lucene" QParser, term queries on date fields cause the field value portion
of the query clause to be truncated at 32 characters. This can cause visible errors about
invalid date math expressions, or may result in silently returning incorrect results if the
truncation results in a valid (but incomplete) date math expression.
> For example...
> {noformat}
> Example...
> last_modified:"2013-03-08T00:46:15Z/DAY+6MONTHS+3DAYS"
> ...truncates to...
> last_modified:"2013-03-08T00:46:15Z/DAY+6MONTHS"
> (silently incorrect)
> foo_tdt:"2013-03-10T08:00:00.1Z/MINUTE+6MONTHS"
> ...truncates to...
> foo_tdt:2013-03-10T08:00:00.1Z/MINUTE+6M
> ("Invalid Date Math String" error msg)
> {noformat}
> This problem does not affect range queries, or queries using either the term or field
qparsers...
> {noformat}
> Examples that work fine even though the math is longer then 32 chars...
> foo_tdt:[2013-03-10T08:00:00.1Z/MINUTE+6MONTHS TO 2013-03-10T08:00:00.1Z/MINUTE+6MONTHS]
> {!term f=bday}1976-07-04T12:08:56.45Z/SECOND+235MILLIS
> foo_tdt:"2013-03-10T08:00:00.1Z/MINUTE+6MONTHS"
> {noformat}
> {panel:title=Original problem report}
> 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
> {panel}

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message