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

Deprecate types in put mapping (backport to 6.x). #37627

Merged
merged 4 commits into from
Jan 22, 2019

Conversation

jtibshirani
Copy link
Contributor

@jtibshirani jtibshirani commented Jan 19, 2019

Backport of #37280, opening a PR to get a full build. This PR also makes some
changes to account for the different default for include_type_name.

From previous PRs, the `include_type_name` parameter was already present
and defaulted to true. This PR makes the following updates:

- Add deprecation warnings to `RestPutMappingAction`, plus tests in `RestPutMappingActionTests`.
- Add a typeless 'put mappings' method to the Java HLRC, and deprecate the old typed version.
  To do this cleanly, I opted to create a new `PutMappingRequest` object that differs from
  the existing server one.
@jtibshirani jtibshirani added :Search Foundations/Mapping Index mappings, including merging and defining field types backport labels Jan 19, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

jtibshirani and others added 2 commits January 18, 2019 17:58
The recently introduced client side PutMappingRequestTests has an edge case that
leads to failing tests. When the "source" or the original request is `null` it
gets rendered to xContent as an empty object, which by the test class itself is
parsed back as an empty map. For this reason the original and the parsed request
differ (one has an empty source, one an empty map). This fixes this edge case by
assuming an empty map means a null source in the request. In practice the
distinction doesn't matter because all the client side request does is write
itself to xContent, which gives the same result regardless of whether `source`
is null or empty.

Closes elastic#37654
@jtibshirani
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

@jtibshirani
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample

@jtibshirani jtibshirani merged commit 24e3019 into elastic:6.x Jan 22, 2019
@jtibshirani jtibshirani deleted the deprecate-types-in-put-mapping branch January 22, 2019 21:11
@jtibshirani jtibshirani added v6.7.0 and removed v6.7.0 labels Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Search Foundations/Mapping Index mappings, including merging and defining field types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants