lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9085) DateRangeField is broken before the year 1582
Date Sat, 14 May 2016 04:27:12 GMT

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

ASF subversion and git services commented on SOLR-9085:
-------------------------------------------------------

Commit 8309bae5ff11c6c9e5835c60b6f8b08bd810737d in lucene-solr's branch refs/heads/branch_6_0
from [~dsmiley]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8309bae ]

SOLR-9080 SOLR-9085: Fix date math before the year 1582.
note: DateMathParser no longer needs a Locale
(cherry picked from commit 4193e60)
(cherry picked from commit 9d826ff)


> DateRangeField is broken before the year 1582
> ---------------------------------------------
>
>                 Key: SOLR-9085
>                 URL: https://issues.apache.org/jira/browse/SOLR-9085
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 6.0
>            Reporter: David Smiley
>            Assignee: David Smiley
>             Fix For: 6.1
>
>         Attachments: SOLR-9085.patch
>
>
> DateRangeField has some issues for dates before 1582 (the Gregorian Change Date), following
Solr 6.  The main problem is that it uses DateMathParser which no longer observes a GCD and
then it converts that Date to a Calendar using Calendar.setTime(date) which considers the
GCD.  We can't altogether avoid Calendar.java as in SOLR-9080 because DateRangePrefixTree
currently fundamentally depends on it.  However I recently learned we can simply change the
GCD like so: {{cal.setGregorianChange(new Date(Long.MIN_VALUE));}} beforehand.  DateRangeField
also calls Calendar.getTime as well, which is affected by GCD considerations.
> For users that use DateRangeField but do *not* use "Date Math" and do not have 'Z' in
their date strings then date strings are completely parsed by DateRangePrefixTree and there
should be no issue.
> DateRangePrefixTree ought to be improved a bit too (in a separate issue)... like making
the GCD configurable, and setting using SimpleDateFormatter.setCalendar it uses to format.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message