How to use bulk to retrieve data from another index


Hi I read in your documentation 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?

(Nik Everett) #2

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 which I hope will make it into 2.3 which should make the whole thing one API call.

(system) #3