ronsher
(ronsher)
February 17, 2016, 10:18am
1
I'm using version 1.7.4
We've set index.mapper.dynamic: false in the elasticsearch.yml
I've noticed that new fields are automatically created (and added to the mapping) even though they are not part of the original mapping we provided.
I was under the impression that dynamic:false ignores fields that are not defined (as opposed to strict that also throws an exception).
Am I missing something?
charmon79
(Chris Harmon)
February 17, 2016, 6:24pm
2
Try adding "dynamic":"false" to your mapping:
{
"MyDocument":{
"dynamic":"false",
"properties":{
...
}
}
}
ronsher
(ronsher)
February 18, 2016, 5:54am
3
Isn't putting index.mapper.dynamic: false in the elasticsearch.yml file a valid configuration?
Does elasticsearch ignore that?
anhlqn
(Anh)
February 18, 2016, 7:35am
4
I think your index mapping may overwrite the settings in elasticsearch.yml.
ronsher
(ronsher)
February 18, 2016, 7:42am
5
But I wanted the default to block dynamic mappings
anhlqn
(Anh)
February 18, 2016, 7:56am
6
Can you post your current mapping templates?
charmon79
(Chris Harmon)
February 19, 2016, 1:47pm
7
Sounds like this was a known bug & possibly fixed in December, though I'm not sure how to tell in which version (I'm still rather new to git).
Even with index.mapper.dynamic: false in the config file, automatic mapping is being created.
Documentation states that:
Automatic mapping creation can be disabled by...
:Mapping
adoptme
bug
low hanging fruit
jasontedor
(Jason Tedor)
February 24, 2016, 11:07pm
8
It will be fixed in version 2.3.0 of Elasticsearch.