# How to use bulk to retrieve data from another index

**URL:** <https://discuss.elastic.co/t/how-to-use-bulk-to-retrieve-data-from-another-index/41642>\
**Category:** Elasticsearch\
**Created:** [February 12, 2016, 4:59pm UTC](https://discuss.elastic.co/t/how-to-use-bulk-to-retrieve-data-from-another-index/41642 "2016-02-12T16:59:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayasha88](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@ayasha88](https://discuss.elastic.co/u/ayasha88)\
**Post date:** [February 12, 2016, 4:59pm UTC](https://discuss.elastic.co/t/how-to-use-bulk-to-retrieve-data-from-another-index/41642/1 "2016-02-12T16:59:17Z")

</div>

Hi I read in your [documentation](https://www.elastic.co/guide/en/elasticsearch/guide/current/reindex.html) that in order to retrieve the data from another index I should use the bulk api. But I am not sure how it works.  
I found this code:

`POST _bulk { "delete": { "_index": "website", "_type": "blog", "_id": "1" }} { "create": { "_index": "website", "_type": "blog", "_id": "1" }} { "title": "My first blog post" } { "index": { "_index": "website", "_type": "blog" }} { "title": "My second blog post" } { "update": { "_index": "website", "_type": "blog", "_id": "1", "_retry_on_conflict" : 3} } { "doc" : {"title" : "My updated blog post"} }`

but where should i put the scroll\_id i found with the scroll?  
Thanks

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [February 12, 2016, 5:18pm UTC](https://discuss.elastic.co/t/how-to-use-bulk-to-retrieve-data-from-another-index/41642/2 "2016-02-12T17:18:58Z")

</div>

The bulk API doesn't support a scroll. You are responsible for reading the docs from the scroll and sending them back in the bulk. I'm working on [reindex](https://github.com/elastic/elasticsearch/issues/15201) which I hope will make it into 2.3 which should make the whole thing one API call.

---

<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 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/how-to-use-bulk-to-retrieve-data-from-another-index/41642/3 "2017-07-05T23:16:46Z")

</div>


