TealFawn  
                (Jef Statham)
               
                 
              
                  
                    December 19, 2014,  8:08pm
                   
                   
              1 
               
             
            
              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+unsubscribe@googlegroups.com . 
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2fe8afa3-31f7-427b-bc12-48f0c6d49694%40googlegroups.com . 
For more options, visit https://groups.google.com/d/optout .
             
            
               
               
               
            
            
           
          
            
            
              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+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@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+unsubscribe@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 .
             
            
               
               
               
            
            
           
          
            
              
                TealFawn  
                (Jef Statham)
               
              
                  
                    December 19, 2014,  8:33pm
                   
                   
              3 
               
             
            
              Same error
"error": "ActionRequestValidationException[Validation Failed: 1: mapping 
type is missing;]", 
"status": 400
On Friday, 19 December 2014 15:18:46 UTC-5, Christian Hedegaard wrote:
Try this:
{
"template" : "whateverindex-*",
"mappings" : {
"events" : {
 "_timestamp" : { "enabled" : true },
}
 
}
}
From:  elasti...@googlegroups.com  <javascript:> [mailto: 
elasti...@googlegroups.com  <javascript:>] *On Behalf Of *Jef Statham 
Sent:  Friday, December 19, 2014 12:09 PM 
To:  elasti...@googlegroups.com  <javascript:> 
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 elasticsearc...@googlegroups.com  <javascript:>. 
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+unsubscribe@googlegroups.com . 
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/018967f3-6b08-4e09-a750-bd7339bd48a4%40googlegroups.com . 
For more options, visit https://groups.google.com/d/optout .
             
            
               
               
               
            
            
           
          
            
              
                TealFawn  
                (Jef Statham)
               
              
                  
                    December 19, 2014, 10:03pm
                   
                   
              4 
               
             
            
              Got the posting of the mapping figured out I think I was just missing some 
outter braces on my request body.
now enabling _timestamp on the _source of my document type still didn't 
enable automatic timestamps being added to the documents in Elasticsearch 
1.4.1.
My mapping now looks like:
{
solink_health_monitor: 
{
mappings: 
{
stats: 
{
_timestamp: 
{
enabled: true, 
store: true 
}, 
 
 
properties: 
{
 numChanges: 
{ 
- type: "long"
 
}, 
 
 
tag: 
{
 
 
 
 
 
 
 
 
} 
}
On Friday, 19 December 2014 15:33:19 UTC-5, Jef Statham wrote:
Same error
"error": "ActionRequestValidationException[Validation Failed: 1: mapping 
type is missing;]", 
"status": 400
On Friday, 19 December 2014 15:18:46 UTC-5, Christian Hedegaard wrote:
Try this:
{
"template" : "whateverindex-*",
"mappings" : {
"events" : {
 "_timestamp" : { "enabled" : true },
}
 
}
}
From:  elasti...@googlegroups.com  [mailto:elasti...@googlegroups.com ] *On 
Behalf Of *Jef Statham 
Sent:  Friday, December 19, 2014 12:09 PM 
To:  elasti...@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 elasticsearc...@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+unsubscribe@googlegroups.com . 
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/66b983c1-9a80-4f9c-9916-31facf1afb45%40googlegroups.com . 
For more options, visit https://groups.google.com/d/optout .