-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix template equals when mappings are wrapped (#77008)
When create template v2. mappings will add _doc. This will cause the created template to be inconsistent with the queried template. In template class, add mappingsEquals method, to deal with this case. reproduced: MetadataIndexTemplateServiceTests.testAddComponentTemplate when mappings are not null, the case will failed. ``` Template template = new Template( Settings.builder().build(), new CompressedXContent("{\"properties\":{\"@timestamp\":{\"type\":\"date\"}}}"), ComponentTemplateTests.randomAliases() ); ComponentTemplate componentTemplate = new ComponentTemplate(template, 1L, new HashMap<>()); ``` Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
096b8cc
commit e321fb0
Showing
3 changed files
with
87 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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