ElasticSearch date format

Hi All,

when i insert date to elastic search in the format of yyyy-MM-DD
hh:mm:ss from java api getting date format exception.but when i use
yyyy-MM-DDThh:mm:ss between them it is inserted fine.please explain me is T
here elasticsearch standard format?

please explain me functionality of T in date.i used the default mapping
of elasticsearch i didn't customized any thing.

mapping:

"created": {
              "type": "date",
              "format": "dateOptionalTime"
           }, 

Thanks
phani

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I am speculating here that you should use the ISO 8601 format for dates
since this is quite common and has a timezone which yours lacks
(introducing ambiguity).

The T is a common separator between the date and time parts.

On 31 March 2015 at 14:26, phani.nadiminti@goktree.com wrote:

Hi All,

when i insert date to elastic search in the format of yyyy-MM-DD
hh:mm:ss from java api getting date format exception.but when i use
yyyy-MM-DDThh:mm:ss between them it is inserted fine.please explain me is T
here elasticsearch standard format?

please explain me functionality of T in date.i used the default mapping
of elasticsearch i didn't customized any thing.

mapping:

"created": {
              "type": "date",
              "format": "dateOptionalTime"
           },

Thanks
phani

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMH6%2BawJXDAs175DFWH5T5z5%2B-UvJgppKjvqPRBehzMX2R%2Bz7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

HI James,

Thanks for quick reply..

so my understanding is while inserting in to elasticsearch we need to
use T as separator other wise it won't insert in to date field from java
API because it expecting standard format of ISO 8601 am I right?

Thanks
phani

On Tuesday, March 31, 2015 at 7:48:42 PM UTC+5:30, James Green wrote:

I am speculating here that you should use the ISO 8601 format for dates
since this is quite common and has a timezone which yours lacks
(introducing ambiguity).

The T is a common separator between the date and time parts.

On 31 March 2015 at 14:26, <phani.n...@goktree.com <javascript:>> wrote:

Hi All,

when i insert date to elastic search in the format of yyyy-MM-DD
hh:mm:ss from java api getting date format exception.but when i use
yyyy-MM-DDThh:mm:ss between them it is inserted fine.please explain me is T
here elasticsearch standard format?

please explain me functionality of T in date.i used the default mapping
of elasticsearch i didn't customized any thing.

mapping:

"created": {
              "type": "date",
              "format": "dateOptionalTime"
           }, 

Thanks
phani

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0a7fd7e8-b244-42e9-8427-752474250b07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html

The T is a standard symbol, not exclusive to any one software project.
ElasticSearch uses Joda to parse dates, and it looks like the default
accepts ISO 8601 which I would expect.

On 31 March 2015 at 15:32, phani.nadiminti@goktree.com wrote:

HI James,

Thanks for quick reply..

so my understanding is while inserting in to elasticsearch we need to
use T as separator other wise it won't insert in to date field from java
API because it expecting standard format of ISO 8601 am I right?

Thanks
phani

On Tuesday, March 31, 2015 at 7:48:42 PM UTC+5:30, James Green wrote:

I am speculating here that you should use the ISO 8601 format for dates
since this is quite common and has a timezone which yours lacks
(introducing ambiguity).

The T is a common separator between the date and time parts.

On 31 March 2015 at 14:26, phani.n...@goktree.com wrote:

Hi All,

when i insert date to elastic search in the format of yyyy-MM-DD
hh:mm:ss from java api getting date format exception.but when i use
yyyy-MM-DDThh:mm:ss between them it is inserted fine.please explain me is T
here elasticsearch standard format?

please explain me functionality of T in date.i used the default
mapping of elasticsearch i didn't customized any thing.

mapping:

"created": {
              "type": "date",
              "format": "dateOptionalTime"
           },

Thanks
phani

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/0a7fd7e8-b244-42e9-8427-752474250b07%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/0a7fd7e8-b244-42e9-8427-752474250b07%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMH6%2BawqvJ_DOZUR2u7C%3DU7AvFFr%3DhyBoBTMRwCbdow7kZxOsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi james,

Thanks for the reply under stood your point please walk through the
following scenario i found.

I have important scenario to share with you.

I created index it contains date field no format was specified.

the following is the mapping :

"created" :{

"type" : "date",
"format" : "dateOptionalTime"
}
when I index data using river the date is inserting in the following
format : "2015-03-06T18:04:15.000-06:00" automatically.
due to this I am getting my daily record counts. but if the date format is
2015-03-06T18:04:15.000Z like this it is working fine and showing
daily counts fine
But from database my date is coming like this '2015-03-01 00:00:00' So how
can we control the date from river while indexing in to elasticsearch
which should be display in 2015-03-06T18:04:15.000Z format.
please suggest me on this due to this my monthly sales also not showing
correctly.is there any custom date format need to define when data is
populating
using river from database.
why "-06:00" this is appending at the end of each date please explain me
this concept?

Thanks,
phani

On Tuesday, March 31, 2015 at 8:40:49 PM UTC+5:30, James Green wrote:

http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html

The T is a standard symbol, not exclusive to any one software project.
ElasticSearch uses Joda to parse dates, and it looks like the default
accepts ISO 8601 which I would expect.

On 31 March 2015 at 15:32, <phani.n...@goktree.com <javascript:>> wrote:

HI James,

Thanks for quick reply..

so my understanding is while inserting in to elasticsearch we need to
use T as separator other wise it won't insert in to date field from java
API because it expecting standard format of ISO 8601 am I right?

Thanks
phani

On Tuesday, March 31, 2015 at 7:48:42 PM UTC+5:30, James Green wrote:

I am speculating here that you should use the ISO 8601 format for dates
since this is quite common and has a timezone which yours lacks
(introducing ambiguity).

The T is a common separator between the date and time parts.

On 31 March 2015 at 14:26, phani.n...@goktree.com wrote:

Hi All,

when i insert date to elastic search in the format of yyyy-MM-DD
hh:mm:ss from java api getting date format exception.but when i use
yyyy-MM-DDThh:mm:ss between them it is inserted fine.please explain me is T
here elasticsearch standard format?

please explain me functionality of T in date.i used the default
mapping of elasticsearch i didn't customized any thing.

mapping:

"created": {
              "type": "date",
              "format": "dateOptionalTime"
           }, 

Thanks
phani

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/94b29fca-637d-4d73-84fe-6af4b6300611%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/0a7fd7e8-b244-42e9-8427-752474250b07%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/0a7fd7e8-b244-42e9-8427-752474250b07%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/73bfba69-bff2-48e4-ad72-fad46c9dc124%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.