Skip to content
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

Bug: Elasticsearch - The mapping definition cannot be nested under a type [_doc] #11

Open
212223 opened this issue Mar 25, 2022 · 0 comments

Comments

@212223
Copy link
Contributor

212223 commented Mar 25, 2022

Example PUT request

Creates this error:

The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."}],"type":"illegal_argument_exception","reason":"The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true.

For the Elasticsearch v7.17.1

Request body update required or workaround by adding a query ?include_type_name=true as used in request.sh

However if a user don't use the request.sh for eg by runing setup.sh but use API clients instead then he would not be able to succeed with the original body of the example PUT request

Currently there is no information how to handle that problem in the README.md

Suggested:

  • update the request body for all PUT requests or
  • add information in the README.md how to handle that problem (suffix target with ?include_type_name=true)
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

No branches or pull requests

1 participant