lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwk <>
Subject Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z
Date Wed, 17 Nov 2010 10:12:16 GMT
On 11/16/2010 1:41 PM, Shanmugavel SRD wrote:
> Hi,
>     I am having a field as below in my feed.
> <field name="published_from_dt">0000-00-00T00:00:00Z</field>
>     I have configured the field as below in data-config.xml.
> <field column="published_from_dt"
> xpath="/add/doc/field[@name='published_from_dt']"
> dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss'Z'" />
>     But after indexing, the field value becomes like this
> <date name="published_from_dt">0002-11-30T00:00:00Z</date>
>     I want to have the value as '0000-00-00T00:00:00Z' after indexing also.
> Could anyone help on this?
> PS: I am using solr 1.4.1
As 0000-00-00T00:00:00Z isn't a valid date I don't think the Solr's date 
field will accept it. Assuming this is MySQL you can use the 
zeroDateTimeBehavior connection string option, i.e. 
This will make the mysql driver return those values as NULL instead of 
all-zero dates.



View raw message