Hi everyone,
Using ES 2.3 I create an index with default dynamic templates, just like in the examples.
PUT /myindex
{
"mappings": {
"_default_": {
"dynamic_templates": [
{
"no_date_detection": {
"match_mapping_type": "string",
"mapping": {
"type": "string",
"date_detection": false
}
}
}
]
}
}
}
Then I create a new type and object by
PUT /myindex/gardeners/1
{
"name": "Oscar"
}
When I GET the _mapping afterwards it shows that the default mapping is handed down to the type "gardeners" but "date_detection": false
does not show up in the mapping of the new field "name".
{
"myindex": {
"mappings": {
"_default_": {
"dynamic_templates": [
{
"no_date_detection": {
"mapping": {
"type": "string",
"date_detection": false
},
"match_mapping_type": "string"
}
}
]
},
"gardeners": {
"dynamic_templates": [
{
"no_date_detection": {
"mapping": {
"type": "string",
"date_detection": false
},
"match_mapping_type": "string"
}
}
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
Shouldn't the properties for the field "name" be
"properties": {
"name": {
"type": "string",
"date_detection": false
}
}
?
Is this expected behaviour? And if, how can I verify the mapping got applied to the field?
Thanks in advance and cheers /Carsten
Edit: Fixed preformatted