Skip to content

Conversation

l1nd3r0th
Copy link
Contributor

If the same inner doc is used with both Object and Nested they override each other's mapping type, as shown in the test.

@twiddli
Copy link

twiddli commented May 16, 2020

This is a pretty subtle but serious issue. I just encountered it. Can this get merged?

I get this error when trying to init as a result of this issue:

elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'Root mapping definition has unsupported parameters:  [type : nested]')

The workaround to this error is to delete the faulty key just before creating the index:
cls._doc_type.mapping._meta.pop('type', None)

@l1nd3r0th
Copy link
Contributor Author

This is a pretty subtle but serious issue. I just encountered it. Can this get merged?

I'm all for!

Maintainers, if there's something I can help with to get this moving, please let me know.

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR and for your patience, this is definitely a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants