Date format failing on some docs

Hey all!

Having a weird issue with the _river failing to insert docs from Couchdb.

We have docs and specify the date format like:

"ReceivedAt": {
"type": "date",
"format":
"yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd
HH:mm:ss.SSSSSS||yyyy-MM-dd HH:mm:ss"
},

When we encounter dates like "FieldName": "2013-01-24T10:08:22-05:00", it
fails but when we encouter dates like "FieldName":
"2013-01-24T10:09:48.989-05:00", we can parse it ok. I thought we had both
those formats covered in our schema format but perhaps not? Does the
ordering matter in the format?

Thanks for any advice!

--

Hi,

I think the issue here is that you have your Z enclosed in quotes for the
failing date format:

yyyy-MM-dd'T'HH:mm:ss'Z'

It should work if you remove the quotes around Z.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

On Thu, Jan 24, 2013 at 6:23 PM, JP Toto james.p.toto@gmail.com wrote:

Hey all!

Having a weird issue with the _river failing to insert docs from Couchdb.

We have docs and specify the date format like:

"ReceivedAt": {
"type": "date",
"format":
"yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd
HH:mm:ss.SSSSSS||yyyy-MM-dd HH:mm:ss"
},

When we encounter dates like "FieldName": "2013-01-24T10:08:22-05:00", it
fails but when we encouter dates like "FieldName":
"2013-01-24T10:09:48.989-05:00", we can parse it ok. I thought we had both
those formats covered in our schema format but perhaps not? Does the
ordering matter in the format?

Thanks for any advice!

--

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.