Skip to content

Instantly share code, notes, and snippets.

@unthingable
Last active December 18, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unthingable/5799510 to your computer and use it in GitHub Desktop.
Save unthingable/5799510 to your computer and use it in GitHub Desktop.
es dynamic templates
{
"mytemplate": {
"mappings": {
"_default_": {
"_all": {
"enabled": false
},
"_ttl": {
"default": "1d",
"enabled": true
},
"dynamic_templates": [
{
"int_template": {
"match_mapping_type": "long",
"mapping": {
"type": "integer"
},
"match": "*"
},
"float_template": {
"match_mapping_type": "double",
"mapping": {
"type": "float"
},
"match": "*"
},
"string_template": {
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match": "*"
}
}
],
"_source": {
"enabled": true
}
}
}
}
}
@unthingable
Copy link
Author

What is wrong with this template?

[indices/create]]; nested: MapperParsingException[mapping [_default_]]; nested: MapperParsingException[A dynamic template must be defined with a name]; ","status":400}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment