# In same cluster, logstash can move data from A index to B index?

**URL:** <https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183>\
**Category:** Logstash\
**Created:** [August 11, 2015, 10:13am UTC](https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183 "2015-08-11T10:13:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jungmi\_Yoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jungmi_yoo/32/33449_2.png) [@Jungmi\_Yoo](https://discuss.elastic.co/u/Jungmi_Yoo)\
**Post date:** [August 11, 2015, 10:13am UTC](https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183/1 "2015-08-11T10:13:12Z")

</div>

To use Input / Output elasticsearch plugin, Can queried data from A index to B index ?  
Also query is aggregation query.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 11, 2015, 10:20am UTC](https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183/2 "2015-08-11T10:20:51Z")

</div>

Yes, using something like [https://gist.github.com/markwalkom/8a7201e3f6ea4354ae06](https://gist.github.com/markwalkom/8a7201e3f6ea4354ae06)

---

<div class="post-metadata">

**Author:** ![Jungmi\_Yoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jungmi_yoo/32/33449_2.png) [@Jungmi\_Yoo](https://discuss.elastic.co/u/Jungmi_Yoo)\
**Post date:** [August 25, 2015, 3:54am UTC](https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183/3 "2015-08-25T03:54:16Z")

</div>

I'm failing my query is like this.  
query =\> '{"aggs":{"terms\_keyword":{"terms":{"field":"user\_keyword","size":0},"aggs":{"key\_score":{"terms":{"field":"inquiry\_id","size":0},"aggs":{"key\_score":{"sum":{"field":"inquiry\_score"}}}}}}}}'

it don't input destination index.

---

<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:** [July 6, 2017, 5:31am UTC](https://discuss.elastic.co/t/in-same-cluster-logstash-can-move-data-from-a-index-to-b-index/27183/4 "2017-07-06T05:31:01Z")

</div>

Closed on July 6, 2017, 5:31am UTC


