-
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
Block Mapping on Reserved Field #35389
Comments
Pinging @elastic/es-search-aggs |
As a side note, if you try to put it into the It seems like we need to become a little stricter about unknown fields outside of the |
Thanks @pickypg for reporting this and sorry for the very late response! I dug a bit into this behavior and had a few clarifications:
I think a big reason your original example caused confusion is that we accept |
The parsing code for metadata fields historically inherits from the existing parsing code for fields in the mappings, where type is the one parameter that every field type accepts. As a consequence, the metadata field definition has been silently ignoring the type parameter, despite the type of metadata fields can never be changed. Furthermore, with the recent move to parsing through builders (elastic#59847), we've been accepting other unsupported parameters like fields, copy_to and boost. This commit refactors the parsing method for metadata field builders to not reuse the base logic but a rather simplified version. In the case of type, fields, copy_to and boost we issue a deprecation warning starting from indices created on 8.6 Closes elastic#35389
…ta field definition (#90989) The parsing code for metadata fields historically inherits from the existing parsing code for fields in the mappings, where type is the one parameter that every field type accepts. As a consequence, the metadata field definition has been silently ignoring the type parameter, despite the type of metadata fields can never be changed. Furthermore, with the recent move to parsing through builders (#59847), we've been accepting other unsupported parameters like fields, copy_to and boost. This commit refactors the parsing method for metadata field builders to not reuse the base logic but a rather simplified version. In the case of type, fields, copy_to and boost we issue a deprecation warning starting from indices created on 8.6. Closes #35389
When trying to change the behavior of certain reserved fields, a user may be tempted to try to change their mapping:
This doesn't work (it remains mapped as
text
in this case, which coincidentally seems wrong), but the request is accepted. When fetching the mapping, this attempted alteration does not exist in the response.Relates to #8143.
The text was updated successfully, but these errors were encountered: