Dear team,
I try to load data to exist Elasticsearch cluster (version 2.3). Follow the guild (https://github.com/snowplow/snowplow/wiki/kinesis-elasticsearch-sink-setup), I create the mapping on ES, and as the note (On a 2.x cluster you will need to remove the _timestamp key), I run:
curl -XPUT 'http://localhost:9200/snowplow' -d '{
"settings": {
"analysis": {
"analyzer": {
"default": {
"type": "keyword"
}
}
}
},
"mappings": {
"enriched": {
"_ttl": {
"enabled":true,
"default": "604800000"
},
"properties": {
"geo_location": {
"type": "geo_point"
}
}
}
}
}'
Error:
{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to parse setting [XContentMapValues.nodeTimeValue] with value [604800000] as a time value: unit is missing or unrecognized"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [enriched]: Failed to parse setting [XContentMapValues.nodeTimeValue] with value [604800000] as a time value: unit is missing or unrecognized","caused_by":{"type":"parse_exception","reason":"Failed to parse setting [XContentMapValues.nodeTimeValue] with value [604800000] as a time value: unit is missing or unrecognized"}},"status":400}
So, I tried to run as below, and it was done without error.
Is it OK?
curl -XPUT 'http://localhost:9200/snowplow' -d '{
"settings": {
"analysis": {
"analyzer": {
"default": {
"type": "keyword"
}
}
}
},
"mappings": {
"enriched": {
"_timestamp" : {
"enabled" : "yes",
},
"_ttl": {
"enabled":true,
},
"properties": {
"geo_location": {
"type": "geo_point"
}
}
}
}
}'