Index template syntax errors for version 5.0


(Håkan Klingensjö) #1

We run an elastic cloud setup. I can not get ES to accept a new index template, which I submit from the built-in Console. The basic error message is that there are syntax errors. But I have been careful to use syntax according to https://www.elastic.co/guide/en/elasticsearch/reference/5.0/dynamic-templates.html

Example ES error message after I put the index template:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.hkl-logstash.mappings.default.dynamic_templates.0.message_field.mapping.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.hkl-logstash.mappings.default.dynamic_templates.0.message_field.mapping.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}

My index template just use "type": "text" in a dynamic template. This should be supported.

Console input:

PUT /_template
{
"hkl-logstash": {
"order": 1,
"template": "logstash-2016.12.14",
"version": 11,
"settings": {
"index": {
"refresh_interval": "2s"
}
},
"mappings": {
"default": {
"dynamic_templates": [
{
"message_field": {
"mapping": {
"type": "text"
},
"match_mapping_type": "string",
"match": "message"
}
},
{
"string_fields": {
"mapping": {
"type": "text",
"norms": false,
"fields": {
"raw": {
"ignore_above": 256,
"index": "not_analyzed",
"type": "string"
}
}
},
"match_mapping_type": "string",
"match": "*"
}
}
],
"_all": {
},
"properties": {
"geoip": {
"dynamic": true,
"type": "object",
"properties": {
"location": {
"type": "geo_point"
}
}
},
"@version": {
"type": "keyword"
}
}
}
},
"aliases": {}
}
}

Anybody has ideas?

Update: My cluster ID is "fcb1bf"


(Erik Redding) #2

This is a question specific to Elasticsearch functionality; I'm going to reassign the category where this has been posted so you'll have a better chance of getting an answer.

Regards,
Erik


(Håkan Klingensjö) #3

Update:
I updated our Elastic Cloud to 5.1.1 and that solved the syntax issue. Suddenly templates with "type":"text" can be used, as it is supposed to.
Keeping this open for a while since there might be other syntax issues in version 5.1.1


(system) #4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.