{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/17998","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17998/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17998/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17998/events","html_url":"https://github.com/elastic/elasticsearch/issues/17998","id":151238370,"number":17998,"title":"Allow reindex API to move documents instead of just copying","user":{"login":"HonzaKral","id":32132,"avatar_url":"https://avatars.githubusercontent.com/u/32132?v=3","gravatar_id":"","url":"https://api.github.com/users/HonzaKral","html_url":"https://github.com/HonzaKral","followers_url":"https://api.github.com/users/HonzaKral/followers","following_url":"https://api.github.com/users/HonzaKral/following{/other_user}","gists_url":"https://api.github.com/users/HonzaKral/gists{/gist_id}","starred_url":"https://api.github.com/users/HonzaKral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HonzaKral/subscriptions","organizations_url":"https://api.github.com/users/HonzaKral/orgs","repos_url":"https://api.github.com/users/HonzaKral/repos","events_url":"https://api.github.com/users/HonzaKral/events{/privacy}","received_events_url":"https://api.github.com/users/HonzaKral/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Reindex%20API","name":":Reindex API","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-26T21:02:50Z","updated_at":"2016-05-06T09:45:58Z","closed_at":"2016-05-06T09:45:58Z","body":"A use case we see a lot with users is that they want to move some data out of one index to another. Would it be possible to combine the `reindex` with `delete-by-query` essentially? After a document is indexed in the target index a delete operation will be issued on the source index.\r\n\r\nOf course this couldn't be done atomically, but even on best effort basis this would be super useful for a lot of people - essentially executing `reindex` and `delete-by-query` at the same time (on the same point in time snapshot of the index) with no additional guarantees than those two operations have individually."}}