Elastic won't edit your source. The long type is used internally 2015-03-20 14:16 GMT-03:00 Erik Iverson <[email protected]>:
> Hello everyone, > > I have a question on how Elasticsearch returns JSON representations of > fields with the "date" type. My confusion comes from the fact that the page > http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html > says: > > "The date type is a special type which maps to JSON string type. It > follows a specific format that can be explicitly set. *All dates are UTC. > Internally, a date maps to a number type long, with the added parsing stage > from string to long and from long to string.*" (emphasis mine) > > It sounds like dates are stored as type 'long'. But when I POST documents > with dates and then retrieve them, they are returned in the same format as > I POSTed them. So it appears ES is storing how I POSTed each date > somewhere. > > I have a reproducible curl example demonstrating my confusion in more > detail on Stackoverflow here: > > > http://stackoverflow.com/questions/29157945/how-does-elasticsearch-convert-dates-to-json-string-representations > > Thank you for any insights! > > > Best, > --Erik Iverson > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/add6bafe-bdba-406e-b95d-ade17d0a9df5%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/add6bafe-bdba-406e-b95d-ade17d0a9df5%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAJp2530Vwz99jV1K0JWNpGkOvR23PhHPAPacc-oROO0hZFjA0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
