You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rohit arora <ro...@yahoo.com> on 2008/12/18 15:33:08 UTC

Problem in Date Format in Solr 1.3


Hi

I have upgraded from solr lucene 1.2 to solr lucene 1.3. I have coppied
all the "<fieldtype" tags in "<types>" tag of   "schema.xml" from the 
solr 1.2 to solr 1.3 it gives an error..

SEVERE: org.apache.solr.common.SolrException: Invalid Date in Date Math String:'2006-Oct-10T10:06:13Z'

can you help me in this problem.

with regards
   Rohit Arora





      

Re: Problem in Date Format in Solr 1.3

Posted by Chris Hostetter <ho...@fucit.org>.
: I have upgraded from solr lucene 1.2 to solr lucene 1.3. I have coppied
: all the "<fieldtype" tags in "<types>" tag of   "schema.xml" from the 
: solr 1.2 to solr 1.3 it gives an error..
: 
: SEVERE: org.apache.solr.common.SolrException: Invalid Date in Date Math 
: String:'2006-Oct-10T10:06:13Z'

That is not a legal Date value, I don't think that "Oct" value actually 
worked in Solr 1.2 at all -- but Solr 1.2 had no sanity checking of date 
values, so it was probably silently failing and doing something 
unexpected.

You should always read the "Upgrading from Solr X.Z" section of 
CHANGES.txt when upgrading, since it has important info you need to know 
when upgrading.  in the case of Solr 1.3 there was a very explicit note 
about this...

http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.3.0/CHANGES.txt

"In Solr 1.2, DateField did not enforce the canonical representation of
the ISO 8601 format when parsing incoming data, and did not generation
the canonical format when generating dates from "Date Math" strings
(particularly as it pertains to milliseconds ending in trailing zeros)
-- As a result equivalent dates could not always be compared properly.
This problem is corrected in Solr 1.3, but DateField users that might
have been affected by indexing inconsistent formats of equivilent
dates (ie: 1995-12-31T23:59:59Z vs 1995-12-31T23:59:59.000Z) may want
to consider reindexing to correct these inconsistencies.  Users who
depend on some of the the "broken" behavior of DateField in Solr 1.2
(specificly: accepting any input that ends in a 'Z') should consider
using the LegacyDateField class as a possible alternative.  Users that
desire 100% backwards compatibility should consider using the Solr 1.2
version of DateField."





-Hoss