Hi

I am trying to format my _timestamp to be in a human readable format

DELETE /twitter
PUT /twitter
PUT /twitter/tweet/_mapping
{ "tweet" : 
  { 
  "_timestamp" : 
        { "enabled" : true, "store" : true, "format": "yyyy" }    
  
  } 
}
PUT /twitter/tweet/1
{
  "msg": "this is the tweet"
}
GET /twitter/_search
{
  "fields": ["_timestamp", "_source"]
}

But it always appears as seconds since 1970


I can do something like this but that just overrides the contents of 
_timestamp: what 
I want to do is use the contents of _timestamp and format it.
DELETE /twitter
PUT /twitter
PUT /twitter/tweet/_mapping
{ "tweet" : 
  { 
  "_timestamp" : 
        { "enabled" : true, "store" : true, "format": "yyyy" , "path": "d"},
        "d": "date"
  
  } 
}
PUT /twitter/tweet/1
{
  "msg": "this is the tweet",
  "d": "2014"
}
GET /twitter/_search
{
  "fields": ["_timestamp", "_source"]
}


-- 
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/6e6b1b24-c522-44b2-a570-b2ff3f088878%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to