# How do I update data across indexes

**URL:** <https://discuss.elastic.co/t/how-do-i-update-data-across-indexes/313945>\
**Category:** Elasticsearch\
**Created:** [September 8, 2022, 6:11am UTC](https://discuss.elastic.co/t/how-do-i-update-data-across-indexes/313945 "2022-09-08T06:11:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chihao9332](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chihao9332/32/110581_2.png) [@chihao9332](https://discuss.elastic.co/u/chihao9332)\
**Post date:** [September 8, 2022, 6:11am UTC](https://discuss.elastic.co/t/how-do-i-update-data-across-indexes/313945/1 "2022-09-08T06:11:11Z")

</div>

问题描述：索引B中新增加了两个字段，现需要从索引A中获取这两个字段的值并赋值给B  
详细情况：  
1.索引A中部分字段：pro\_id, tran\_id, app\_id, type .......  
2.索引B中部分字段：app\_id, type .......  
3. 现 索引B中新增 pro\_id和tran\_id字段，要求将存量数据与索引A中数据同步  
4. 即：当 满足 A.app\_id=B.app\_id 和 A.type=B.type 时，将A.pro\_id、A.tran\_id 赋值到索引B

```auto
type or paste code here

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 6, 2022, 6:11am UTC](https://discuss.elastic.co/t/how-do-i-update-data-across-indexes/313945/2 "2022-10-06T06:11:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
