-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.mapper.dynamic=false not respected in Elasticsearch 6.x #36711
Comments
@bittusarkar this setting has been removed in #25734 . See https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html#_schedule_for_removal_of_mapping_types for the plan. I think this explains the behavior you're seeing, the only type the index will have is named "test_mapping" . Trying to add another type will make ES complain:
The setting is ignored because sadly there is no setting validation under the |
Also, this setting is deprecated in Elasticsearch 6.x and removed in Elasticsearch 7.x. The deprecation message is |
@albertzaharovits See my comment above. I would understand the setting is useless if the only configuration possible was an index having a single mapping. But that is not true. An index can also have zero mapping as I have shown above. As long as a zero mapping index configuration is allowed, having this setting makes sense. |
@bittusarkar are you complaining that you can add the mapping to an index after it has been created? Some might consider this a feature, but you're politely invited to open a new issue and state your case for how this behavior is causing unexpected behavior. |
I understand why the setting is removed. To make this deprecation air tight, I am proposing the index creation logic should fail if mapping is not provided. This setting disallows creation of mapping automatically. Now, say I create an index with no mapping. Then due to some bug, a mapping gets created automatically (this has happened to us in the past). Then when I actually try to create the correct mapping explicitly, it would fail saying I cannot add multiple mappings. If this setting works as it did in Elasticsearch 5.x, a mapping would not get created due to the bug and my explicit mapping creation would succeed. I hope I was able to explain the scenario. We won't hit this issue because we always create an index with the mapping. I reported this issue because I felt this was a bug in Elasticsearch. |
Elasticsearch version (
bin/elasticsearch --version
): 6.5.3Plugins installed: []
JVM version (
java -version
): 1.8.0_72OS version (
uname -a
if on a Unix-like system): Windows 10Description of the problem including expected versus actual behavior:
Setting the value of index setting
"index.mapper.dynamic"
tofalse
does not work in Elasticsearch 6.x.Steps to reproduce:
Execute the following commands:
Elasticsearch 5.6.10 fails as expected with the following response:
Elasticsearch 6.5.3 succeeds (not expected) with the following response:
The text was updated successfully, but these errors were encountered: