-
Notifications
You must be signed in to change notification settings - Fork 24.6k
-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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 fails with MapperParsingException when dynamic_templates provided #2898
Comments
FYI PUTting the document shown above with the "meta" element as a single object (not an array) works
|
Strike that last comment.. the non-array variant works in 0.19.12 but still fails in 0.20.xx. The original case fails in 0.19.12 also, but with a different error:
|
The reason this happens is that the Btw, no need to explicitly store fields, since the |
OK thanks. The "store" option is there because I copy/pasted from the "real" mapping which has source storage disabled. I won't pollute the issue tracker with "forum" style questions, but perhaps you could advise as to how I create a mapping that defaults any unknown value to string. I run into problems with auto-inferring types because my documents are not consistent (outside my control). I have created a forum thread here: Thanks! |
you can set in the root object mapping |
oh awesome.. thanks |
No dice :( the following fails:
|
Also setting specific types on the dynamic_mapping doesn't seem to work for me:
Results in:
|
This last comment may be a separate issue, I have opened a new issue to isolate this case: The original problem remains however. That is, how to create a mapping that deals with variable types in documents. More specifically, "default to string where not mapped". This does not seem to be possible. |
Any workarounds for this? The only solution outside of ES I can see is to manually traverse each document switching non-string values to strings.. which is possible but a little painful. |
@jasonpolites the original issue seems to have been fixed already. the issue in your last example works if you use this instead:
|
I'm not sure if the title of this is correct, because I'm not sure what the cause of this is, but here's what I'm seeing:
The following sequence of commands will fail:
The failure is
It's not clear from the documentation why this doesn't work, or how one would assign a default type to unexpected field values if this mapping approach is wrong.
The issue seems to have been introduced from this commit:
6243f8e
The text was updated successfully, but these errors were encountered: