Remove CreateIndexRequest.addMapping(type, string, xcontenttype)#50419
Merged
romseygeek merged 4 commits intoelastic:masterfrom Jan 2, 2020
Merged
Conversation
Collaborator
|
Pinging @elastic/es-distributed (:Distributed/CRUD) |
Contributor
Author
|
@elasticmachine update branch |
nik9000
approved these changes
Dec 23, 2019
| String mapping = Strings.toString(XContentFactory.jsonBuilder().startObject().startObject("type1") | ||
| .startObject("properties").startObject("appAccountIds").field("type", "text").endObject().endObject() | ||
| String mapping = Strings.toString(XContentFactory.jsonBuilder().startObject() | ||
| .startObject("properties").startObject("appAccountIds").field("type", "text").endObject() |
Member
There was a problem hiding this comment.
I try to re-indent these when I see them to make them a bit more readable.
Contributor
Author
|
@elasticmachine update branch |
This was referenced Jan 2, 2020
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
…stic#50419) We still have a number of places, mainly in test code but some in production, that are building mappings with a named type as the root of a map. CreateIndexRequest handles this automatically, but PutMappingRequest does not, which is a bit trappy - we can get situations like elastic#50359 where the same mapping will work when an index is created but fail on an update. This commit is a first step to removing the leniency in CreateIndexRequest so that we can catch mappings with a named type root earlier. Relates to elastic#41059
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
…Builder)` (elastic#50586) This continues the removal of type parameters from CreateIndexRequest.mapping methods started in elastic#50419. Here the removed methods are almost entirely in test code, with the exception of a change to TransformIndex in the transform plugin. Relates to elastic#41059
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We still have a number of places, mainly in test code but some in production, that
are building mappings with a named type as the root of a map. CreateIndexRequest
handles this automatically, but PutMappingRequest does not, which is a bit trappy -
we can get situations like #50359 where the same mapping will work when an
index is created but fail on an update.
This commit is a first step to removing the leniency in CreateIndexRequest so that
we can catch mappings with a named type root earlier.
Relates to #41059