Try this:

{
"template" : "whateverindex-*",
   "mappings" : {
   "events" : {
     "_timestamp" : { "enabled" : true },
    }
  }
}

From: elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com] On 
Behalf Of Jef Statham
Sent: Friday, December 19, 2014 12:09 PM
To: elasticsearch@googlegroups.com
Subject: Cannot figure out how to add automatic timestamps when a document is 
indexed.

I've been trying a PUT to an existing index /solink_health_monitor/_mapping to 
add a timestamp field to the document _source

"mappings": {
    "stats": {
        "properties": {
            "@timestamp:": {
                        "enabled": true,
                        "store": true
            }
        }
    }
}

I get the following response

{
            "error": "ActionRequestValidationException[Validation Failed: 1: 
mapping type is missing;]",
            "status": 400
}

--
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+unsubscr...@googlegroups.com<mailto:elasticsearch+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/2fe8afa3-31f7-427b-bc12-48f0c6d49694%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/2fe8afa3-31f7-427b-bc12-48f0c6d49694%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/5CF8216AA982AF47A8E6DEACA629D22B4EFF0743%40s-us-ex-6.US.R5S.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to