{"comment":{"url":"https://api.github.com/repos/nwolff/elastic/comments/10933518","html_url":"https://github.com/nwolff/elastic/commit/6691a39fb934ed72dd66ec89b9bdc5f43d4ea97c#commitcomment-10933518","id":10933518,"user":{"login":"olivere","id":134848,"avatar_url":"https://avatars.githubusercontent.com/u/134848?v=3","gravatar_id":"","url":"https://api.github.com/users/olivere","html_url":"https://github.com/olivere","followers_url":"https://api.github.com/users/olivere/followers","following_url":"https://api.github.com/users/olivere/following{/other_user}","gists_url":"https://api.github.com/users/olivere/gists{/gist_id}","starred_url":"https://api.github.com/users/olivere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivere/subscriptions","organizations_url":"https://api.github.com/users/olivere/orgs","repos_url":"https://api.github.com/users/olivere/repos","events_url":"https://api.github.com/users/olivere/events{/privacy}","received_events_url":"https://api.github.com/users/olivere/received_events","type":"User","site_admin":false},"position":23,"line":45,"path":"reindexer.go","commit_id":"6691a39fb934ed72dd66ec89b9bdc5f43d4ea97c","created_at":"2015-04-28T06:18:25Z","updated_at":"2015-04-28T06:18:25Z","body":"Maybe we should return a `BulkableRequest` here. It's an interface that is implemented by `*BulkIndexRequest`, `*BulkDeleteRequest`, and `*BulkUpdateRequest`. What do you think? Then a name like `HitToBulkRequestFunc` would also make more sense, wouldn't it?\r\n\r\nI just tested that an it'd leave us with a problem that the `BulkableRequest` doesn't have a function to set the index name (used in `Reindexer.Do`). So we would have to decide to a) extend the `BulkableRequest` interface, b) reflect in `Do` and set the index there for the three bulk-request types, or c) let `Reindexer` really only do reindexing, i.e. only use `*BulkIndexRequest`.\r\n\r\nWhat do you think?"}}