@@ -489,32 +489,36 @@ public void traverseAndFlatten_alias_to_unresolvable_path_throws_descriptive_err
489489 // Alias path targets a text multi-field, which is not in the flattened mapping.
490490 Map <String , OpenSearchDataType > keywordAliasTree =
491491 Map .of (
492- "source" , textKeywordType ,
492+ "source" ,
493+ textKeywordType ,
493494 "source_alias" ,
494- new OpenSearchAliasType ("source.keyword" , OpenSearchDataType .of (MappingType .Invalid )));
495+ new OpenSearchAliasType ("source.keyword" , OpenSearchDataType .of (MappingType .Invalid )));
495496 SemanticCheckException keywordException =
496497 assertThrows (
497498 SemanticCheckException .class ,
498499 () -> OpenSearchDataType .traverseAndFlatten (keywordAliasTree ));
499500 assertEquals (
500- "Alias field [source_alias] refers to unresolved path [source.keyword]. The alias path"
501- + " must point to an existing field in the mapping; a text multi-field (e.g."
502- + " \" source.keyword.keyword\" ) or a removed/renamed field is not a valid alias target." ,
501+ "Alias field [source_alias] refers to unresolved path [source.keyword]. The alias path must"
502+ + " point to an existing field in the mapping; a text multi-field (e.g."
503+ + " \" source.keyword.keyword\" ) or a removed/renamed field is not a valid alias"
504+ + " target." ,
503505 keywordException .getMessage ());
504506
505507 // Alias path targets a field that does not exist.
506508 Map <String , OpenSearchDataType > missingFieldTree =
507509 Map .of (
508- "col1" , textType ,
509- "col_alias" , new OpenSearchAliasType ("missing" , OpenSearchDataType .of (MappingType .Invalid )));
510+ "col1" ,
511+ textType ,
512+ "col_alias" ,
513+ new OpenSearchAliasType ("missing" , OpenSearchDataType .of (MappingType .Invalid )));
510514 SemanticCheckException missingException =
511515 assertThrows (
512516 SemanticCheckException .class ,
513517 () -> OpenSearchDataType .traverseAndFlatten (missingFieldTree ));
514518 assertEquals (
515519 "Alias field [col_alias] refers to unresolved path [missing]. The alias path must point to"
516- + " an existing field in the mapping; a text multi-field (e.g. \" missing.keyword\" ) or a "
517- + " removed/renamed field is not a valid alias target." ,
520+ + " an existing field in the mapping; a text multi-field (e.g. \" missing.keyword\" ) or"
521+ + " a removed/renamed field is not a valid alias target." ,
518522 missingException .getMessage ());
519523 }
520524
0 commit comments