Commit 5d57c80
committed
#AI commit# CC: 修复getProps方法先调用mappings()再序列化 / Fix getProps to call mappings() before serialization
## 问题 / Problem
getProps方法中直接对IndexMappingRecord序列化,没有先调用mappings()获取TypeMapping
## 修复 / Fix
- 先调用mappingRecord.mappings()获取TypeMapping对象
- 然后对TypeMapping进行JsonpUtils.toJsonString序列化
## 原因 / Reason
IndexMappingRecord包含索引级别的元数据,而mappings()返回的TypeMapping才是实际的字段映射定义。
直接序列化IndexMappingRecord会包含多余的结构,导致后续获取properties时路径不正确。
Fix getProps method to call mappings() on IndexMappingRecord before JsonpUtils.toJsonString serialization.
The mappings() method returns TypeMapping which contains the actual field mapping definitions,
while IndexMappingRecord includes additional index-level metadata.1 parent a5997c2 commit 5d57c80
1 file changed
Lines changed: 3 additions & 1 deletion
File tree
- exchangis-engines/engines/datax/datax-elasticsearch8xwriter/src/main/java/com/webank/wedatasphere/exchangis/datax/plugin/writer/elasticsearchwriter/v8x
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
| |||
0 commit comments