{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/22027","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22027/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22027/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22027/events","html_url":"https://github.com/elastic/elasticsearch/issues/22027","id":194035234,"number":22027,"title":"_reindex from remote and its bugs","user":{"login":"celesteking","id":748075,"avatar_url":"https://avatars.githubusercontent.com/u/748075?v=3","gravatar_id":"","url":"https://api.github.com/users/celesteking","html_url":"https://github.com/celesteking","followers_url":"https://api.github.com/users/celesteking/followers","following_url":"https://api.github.com/users/celesteking/following{/other_user}","gists_url":"https://api.github.com/users/celesteking/gists{/gist_id}","starred_url":"https://api.github.com/users/celesteking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celesteking/subscriptions","organizations_url":"https://api.github.com/users/celesteking/orgs","repos_url":"https://api.github.com/users/celesteking/repos","events_url":"https://api.github.com/users/celesteking/events{/privacy}","received_events_url":"https://api.github.com/users/celesteking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-07T12:19:41Z","updated_at":"2016-12-07T13:11:00Z","closed_at":null,"body":"I'm trying to mass-reindex from remote. As elasticdump is \"unsupported\", I was trying to use so-called \"reindex from remote\" feature. It failed in following aspekts:\r\n\r\n* It looks like it's impossible to not specify destination index. I need to transfer multiple indexes from remote. I can't specify them one by one. I need multi-index notation, like `index: blah-*-2016-*` . It looks like this isn't possible without some dirty scripting. It would be wonderful if all this would happen under the hood. \r\n\r\nNext, I was trying to use the documented API.\r\n\r\n```\r\nGET _tasks/Af0W-dC3QQSlJ28uRru0fQ:8488\r\n=>\r\n{\r\n  \"completed\": false,\r\n  \"task\": {\r\n    \"node\": \"Af0W-dC3QQSlJ28uRru0fQ\",\r\n    \"id\": 8488,\r\n    \"type\": \"transport\",\r\n    \"action\": \"indices:data/write/reindex\",\r\n    \"status\": {\r\n      \"total\": 0,\r\n      \"updated\": 0,\r\n      \"created\": 0,\r\n      \"deleted\": 0,\r\n      \"batches\": 0,\r\n      \"version_conflicts\": 0,\r\n      \"noops\": 0,\r\n      \"retries\": {\r\n        \"bulk\": 0,\r\n        \"search\": 0\r\n      },\r\n      \"throttled_millis\": 0,\r\n      \"requests_per_second\": -1,\r\n      \"throttled_until_millis\": 0\r\n    },\r\n    \"description\": \"\",\r\n    \"start_time_in_millis\": 1481112063773,\r\n    \"running_time_in_nanos\": 650222891445,\r\n    \"cancellable\": true\r\n  }\r\n}\r\n```\r\n\r\n```\r\nGET .tasks/task/8488\r\n=>\r\n\u0001{\r\n  \"_index\": \".tasks\",\r\n  \"_type\": \"task\",\r\n  \"_id\": \"8488\",\r\n  \"found\": false\r\n}\r\n```\r\nIt should've been found as per docs.\r\n\r\n```\r\nGET /_tasks/taskId:8488\r\n=>\r\n{\r\n  \"error\": {\r\n    \"root_cause\": [\r\n      {\r\n        \"type\": \"resource_not_found_exception\",\r\n        \"reason\": \"task [taskId:8488] isn't running or stored its results\"\r\n      }\r\n    ],\r\n    \"type\": \"resource_not_found_exception\",\r\n    \"reason\": \"task [taskId:8488] isn't running or stored its results\"\r\n  },\r\n  \"status\": 404\r\n}\r\n```\r\n\r\nIt's also unclear what's going on, was the task stalled, hung, connecting? Why is it taking so long without any movement?  I'm on v5.0.2. Thanks."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/265443349","html_url":"https://github.com/elastic/elasticsearch/issues/22027#issuecomment-265443349","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22027","id":265443349,"user":{"login":"celesteking","id":748075,"avatar_url":"https://avatars.githubusercontent.com/u/748075?v=3","gravatar_id":"","url":"https://api.github.com/users/celesteking","html_url":"https://github.com/celesteking","followers_url":"https://api.github.com/users/celesteking/followers","following_url":"https://api.github.com/users/celesteking/following{/other_user}","gists_url":"https://api.github.com/users/celesteking/gists{/gist_id}","starred_url":"https://api.github.com/users/celesteking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celesteking/subscriptions","organizations_url":"https://api.github.com/users/celesteking/orgs","repos_url":"https://api.github.com/users/celesteking/repos","events_url":"https://api.github.com/users/celesteking/events{/privacy}","received_events_url":"https://api.github.com/users/celesteking/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T13:11:00Z","updated_at":"2016-12-07T13:11:00Z","body":"Also, docs are way far from usable:\r\n```json\r\n  \"source\": {\r\n    \"index\": \"metricbeat-*\"\r\n  },\r\n  \"dest\": {\r\n    \"index\": \"metricbeat\"\r\n  },\r\n  \"script\": {\r\n    \"lang\": \"painless\",\r\n    \"inline\": \"ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'\"\r\n  }\r\n```\r\n\r\nYou're assigning index to itself, basically. this wont' work. maybe you meant `ctx._source._index` ? This is really hard for a newbie guys.\r\n"}}
{"actor":{"display_login":"celesteking"}}