-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
The enabled setting is not updatable (and probably shouldn't) #33566
Comments
Additionally we should probably fail the request to update the mappings in this case too! |
+1 to disallow updating this field Relates to #28070 |
We discussed this issue and agreed to disallow updates to the |
I'll have a look on this one. |
Here is a complete cURL recreation script in this Gist. I'm now debugging to see how |
Sorry @ywelsch, I missed the line where you were saying you has already started to work on this. Feel free to let me know what you want to do. I can push my changes to share with you what I already have. Anyway, if the |
I looks like an exception should be raised in the conditional block below. elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java Line 257 in 15ff3da
|
The "fix" I was working on was to allow dynamically changing "enable", until I noticed that this is not what we want. I have not done any subsequent work on this, so you are free to proceed on this. |
I've opened a PR, could please tell me if this design could fit? See here #33933. If you agree on this, I'll then implement test cases and check for existing test failures. |
This commit adds a check for "enabled" attribute change for types when a RestPutMappingAction is received. A MappingException is thrown when such a change is detected. Change are prevented in both ways: "false -> true" and "true -> false". Closes #33566
This commit adds a check for "enabled" attribute change for types when a RestPutMappingAction is received. A MappingException is thrown when such a change is detected. Change are prevented in both ways: "false -> true" and "true -> false". Closes #33566
Removed the invalid tip that enabled can be updated for existing fields and clarified instead that it cannot. Related to elastic#33566 and elastic#33933
what is the current status of this |
According to the docs , the
enabled
setting for mappings should be updatable (see TIP at the end), which it actually isn't:-> returns same initial mapping :sadtrombone:
While implementing a fix, I noticed that we probably do not want to change and fix this, as this might lead to a surprising effects if the setting is changed during indexing (A field might be indexed on the primary but not on the replica (or vice versa)). Similarly, it might interfere in funny ways with reindexing.
I suggest updating the docs to say that this field is non-updateable, but wanted to raise it first for discussion with @elastic/es-search-aggs.
The text was updated successfully, but these errors were encountered: