Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-18 Thread gwk
While the year zero exists, month zero and day zero don't. And while 
APIs ofttimes accept those values (ie day zero is the last day of the 
previous month) the ISO 8601 spec does not accept it as far as I know.


On 11/18/2010 4:26 AM, Dennis Gearon wrote:

I thought that that value was a perfectly valid one for ISO 9601 time?

http://en.wikipedia.org/wiki/Year_zero


  Dennis Gearon


Signature Warning

It is always a good idea to learn from your own mistakes. It is usually a better
idea to learn from others’ mistakes, so you do not have to make them yourself.
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'


EARTH has a Right To Life,
otherwise we all die.



- Original Message 
From: gwk
To: solr-user@lucene.apache.org
Sent: Wed, November 17, 2010 2:12:16 AM
Subject: Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

On 11/16/2010 1:41 PM, Shanmugavel SRD wrote:

Hi,
 I am having a field as below in my feed.
-00-00T00:00:00Z

 I have configured the field as below in data-config.xml.


 But after indexing, the field value becomes like this
0002-11-30T00:00:00Z

 I want to have the value as '-00-00T00:00:00Z' after indexing also.
Could anyone help on this?

PS: I am using solr 1.4.1

As -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.
mysql://user:passw...@mysqlhost/database?zeroDateTimeBehavior=convertToNull
This will make the mysql driver return those values as NULL instead of
all-zero dates.

Regards,

gwk





Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-17 Thread Shanmugavel SRD

I tried this in JAVA where the SOLR runs. Is it problem due to the encoding?

Code:

GregorianCalendar calendar = new
GregorianCalendar(TimeZone.getTimeZone("US/Eastern"), Locale.US);
System.out.println(calendar.getTime());
calendar.set(0, 0, 0, 0, 0, 0);
System.out.println(calendar.getTime());
System.out.println("System property: "+System.getProperty("file.encoding"));


Output:

Thu Nov 18 02:13:00 EST 2010
Wed Dec 31 00:00:00 EST 2
System property: UTF-8

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/DateFormatTransformer-issue-with-value--00-00T00-00-00Z-tp1910644p1922354.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-17 Thread Dennis Gearon
I thought that that value was a perfectly valid one for ISO 9601 time?

http://en.wikipedia.org/wiki/Year_zero


 Dennis Gearon


Signature Warning

It is always a good idea to learn from your own mistakes. It is usually a 
better 
idea to learn from others’ mistakes, so you do not have to make them yourself. 
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'


EARTH has a Right To Life,
otherwise we all die.



- Original Message 
From: gwk 
To: solr-user@lucene.apache.org
Sent: Wed, November 17, 2010 2:12:16 AM
Subject: Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

On 11/16/2010 1:41 PM, Shanmugavel SRD wrote:
> Hi,
> I am having a field as below in my feed.
> -00-00T00:00:00Z
>
> I have configured the field as below in data-config.xml.
>  xpath="/add/doc/fie...@name='published_from_dt']"
> dateTimeFormat="-MM-dd'T'hh:mm:ss'Z'" />
>
> But after indexing, the field value becomes like this
> 0002-11-30T00:00:00Z
>
> I want to have the value as '-00-00T00:00:00Z' after indexing also.
> Could anyone help on this?
>
> PS: I am using solr 1.4.1
As -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. 
mysql://user:passw...@mysqlhost/database?zeroDateTimeBehavior=convertToNull
This will make the mysql driver return those values as NULL instead of 
all-zero dates.

Regards,

gwk



Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-17 Thread Shanmugavel SRD

Thanks for your reply.
I am indexing docs in XML using DIH. I am not using MySQL to import data.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/DateFormatTransformer-issue-with-value--00-00T00-00-00Z-tp1910644p1916712.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-17 Thread gwk

On 11/16/2010 1:41 PM, Shanmugavel SRD wrote:

Hi,
I am having a field as below in my feed.
-00-00T00:00:00Z

I have configured the field as below in data-config.xml.


But after indexing, the field value becomes like this
0002-11-30T00:00:00Z

I want to have the value as '-00-00T00:00:00Z' after indexing also.
Could anyone help on this?

PS: I am using solr 1.4.1
As -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. 
mysql://user:passw...@mysqlhost/database?zeroDateTimeBehavior=convertToNull
This will make the mysql driver return those values as NULL instead of 
all-zero dates.


Regards,

gwk


DateFormatTransformer issue with value 0000-00-00T00:00:00Z

2010-11-16 Thread Shanmugavel SRD

Hi,
   I am having a field as below in my feed.
-00-00T00:00:00Z

   I have configured the field as below in data-config.xml.
 

   But after indexing, the field value becomes like this
0002-11-30T00:00:00Z

   I want to have the value as '-00-00T00:00:00Z' after indexing also.
Could anyone help on this? 

PS: I am using solr 1.4.1
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/DateFormatTransformer-issue-with-value-0000-00-00T00-00-00Z-tp1910644p1910644.html
Sent from the Solr - User mailing list archive at Nabble.com.