{"action":"created","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/171","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/171/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/171/events","html_url":"https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/171","id":87445445,"number":171,"title":"When Retrying events, use supplied autogenerated ID from ES (when available)","user":{"login":"talevy","id":388837,"avatar_url":"https://avatars.githubusercontent.com/u/388837?v=3","gravatar_id":"","url":"https://api.github.com/users/talevy","html_url":"https://github.com/talevy","followers_url":"https://api.github.com/users/talevy/followers","following_url":"https://api.github.com/users/talevy/following{/other_user}","gists_url":"https://api.github.com/users/talevy/gists{/gist_id}","starred_url":"https://api.github.com/users/talevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talevy/subscriptions","organizations_url":"https://api.github.com/users/talevy/orgs","repos_url":"https://api.github.com/users/talevy/repos","events_url":"https://api.github.com/users/talevy/events{/privacy}","received_events_url":"https://api.github.com/users/talevy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-11T18:49:49Z","updated_at":"2015-06-18T16:25:21Z","closed_at":null,"body":"When ES bulk response returns with errors, an id is associated with the failed event, we should assign this to the logstash event so it will re-use the id upon subsequent submits.\r\n\r\n```\r\nPUT _bulk\r\n{ \"index\": {\"_index\":\"index\",\"_type\":\"type\"}}\r\n{\"f\":\"1\"}\r\n```\r\n\r\n```\r\n{\r\n  \"took\": 1,\r\n  \"errors\": true,\r\n  \"items\": [\r\n      {\r\n        \"create\": {\r\n            \"_index\": \"index\",\r\n            \"_type\": \"type\",\r\n            \"_id\": \"AU3j8SFVDtO3gVUsP8bb\",\r\n            \"status\": 500,\r\n            \"error\": \"ElasticsearchException[bla]\"\r\n        }\r\n      }\r\n  ]\r\n}\r\n```\r\n\r\nin this example, we should reuse the id: `AU3j8SFVDtO3gVUsP8bb`."},"comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/comments/113208684","html_url":"https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/171#issuecomment-113208684","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-output-elasticsearch/issues/171","id":113208684,"user":{"login":"talevy","id":388837,"avatar_url":"https://avatars.githubusercontent.com/u/388837?v=3","gravatar_id":"","url":"https://api.github.com/users/talevy","html_url":"https://github.com/talevy","followers_url":"https://api.github.com/users/talevy/followers","following_url":"https://api.github.com/users/talevy/following{/other_user}","gists_url":"https://api.github.com/users/talevy/gists{/gist_id}","starred_url":"https://api.github.com/users/talevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talevy/subscriptions","organizations_url":"https://api.github.com/users/talevy/orgs","repos_url":"https://api.github.com/users/talevy/repos","events_url":"https://api.github.com/users/talevy/events{/privacy}","received_events_url":"https://api.github.com/users/talevy/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T16:25:21Z","updated_at":"2015-06-18T16:25:21Z","body":"@andrewvc the implication of this is more for when there are communication issues between ES and Logstash where some events may have been indexed, but Logstash does not know. So retrying is always safer if retried with ID supplied by Elasticsearch."}}