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 Mick England <mi...@mac.com> on 2009/07/21 22:02:12 UTC

FATAL: Solr returned an error: Invalid_Date_String

Hi,

I have the following tag in my xml files:

<field name="timestamp">2009-05-06</field>

When I try posting the file I get this error:

FATAL: Solr returned an error: Invalid_Date_String20090506

My schema.xml file has this:

   <field name="timestamp" type="date" indexed="true" stored="true"
default="NOW" multiValued="false"/>

How do I specify a correct date string?

-- 
View this message in context: http://www.nabble.com/FATAL%3A-Solr-returned-an-error%3A-Invalid_Date_String-tp24594686p24594686.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: FATAL: Solr returned an error: Invalid_Date_String

Posted by Mick England <mi...@mac.com>.
Thanks for the quick response. That worked for me.


Andrew McCombe wrote:
> 
> Dates must be in ISO 8601 format:
> 
> http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html
> 
> e.g 1995-12-31T23:59:59Z
> 

-- 
View this message in context: http://www.nabble.com/FATAL%3A-Solr-returned-an-error%3A-Invalid_Date_String-tp24594686p24595148.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: FATAL: Solr returned an error: Invalid_Date_String

Posted by Andrew McCombe <eu...@gmail.com>.
Hi

Dates must be in ISO 8601 format:

http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html

e.g 1995-12-31T23:59:59Z

Hope this helps

Andrew McCombe


2009/7/21 Mick England <mi...@mac.com>

>
> Hi,
>
> I have the following tag in my xml files:
>
> <field name="timestamp">2009-05-06</field>
>
> When I try posting the file I get this error:
>
> FATAL: Solr returned an error: Invalid_Date_String20090506
>
> My schema.xml file has this:
>
>   <field name="timestamp" type="date" indexed="true" stored="true"
> default="NOW" multiValued="false"/>
>
> How do I specify a correct date string?
>
> --
> View this message in context:
> http://www.nabble.com/FATAL%3A-Solr-returned-an-error%3A-Invalid_Date_String-tp24594686p24594686.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>