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 <elasticmachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
licenses | ||
src | ||
build.gradle |