-
Notifications
You must be signed in to change notification settings - Fork 25.2k
mapper_parsing_exception on dynamic: runtime
between object and non-object
#70268
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
Comments
Pinging @elastic/es-search (Team:Search) |
Thanks for opening this one @PhaedrusTheGreek . I am wondering what the ideal user experience would be here. Runtime fields don't affect document parsing, as they are loaded at runtime. In the first scenario you mentioned, the first document would drive how the runtime field is mapped (meaning what type it gets) but following documents with a different type for the same field do get accepted. What happens when a field is mapped as a number but its values are not a number and we perform search on it? At the moment malformed values are ignored, effectively the same behaviour as when The discrepancy around objects is because even if an object holds fields that are all runtime, the object itself will be mapped as an object under the |
I wonder if instead of failing, we could flag a mapping as having conflict so that this could be indicated to the user along with resolution workflow. |
Am I reading it correctly that you find the behaviour around malformed values expected, but the error around object becoming another type unexpected? In the case of flagging, would you then flag both scenarios? |
I would consider an object to be a malformed primitive value and vice versa, and expect the handling to be the same as between malformed values. In either case, non-blocking and flagged. |
When we introduced dynamic:runtime (elastic#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts. With this commit we adapt dynamic:runtime to not dynamically create objects. Closes elastic#70268
When we introduced dynamic:runtime (#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts. With this commit we adapt dynamic:runtime to not dynamically create objects. Closes #70268
Uh oh!
There was an error while loading. Please reload this page.
ES 7.11.1
When using
dynamic:runtime
, I am able to continue "indexing" even when having encountered a runtime mapping conflict:Also, I can search the data if I know what type i'm looking for:
However when Elasticsearch encounters a runtime field conflict between object and non-object mappings, a rejection occurs:
The text was updated successfully, but these errors were encountered: