{"action":"created","issue":{"url":"https://api.github.com/repos/github/elastomer-client/issues/117","labels_url":"https://api.github.com/repos/github/elastomer-client/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/github/elastomer-client/issues/117/comments","events_url":"https://api.github.com/repos/github/elastomer-client/issues/117/events","html_url":"https://github.com/github/elastomer-client/issues/117","id":107772777,"number":117,"title":"Exclude source retrieval in delete_by_query","user":{"login":"TwP","id":6323,"avatar_url":"https://avatars.githubusercontent.com/u/6323?v=3","gravatar_id":"","url":"https://api.github.com/users/TwP","html_url":"https://github.com/TwP","followers_url":"https://api.github.com/users/TwP/followers","following_url":"https://api.github.com/users/TwP/following{/other_user}","gists_url":"https://api.github.com/users/TwP/gists{/gist_id}","starred_url":"https://api.github.com/users/TwP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TwP/subscriptions","organizations_url":"https://api.github.com/users/TwP/orgs","repos_url":"https://api.github.com/users/TwP/repos","events_url":"https://api.github.com/users/TwP/events{/privacy}","received_events_url":"https://api.github.com/users/TwP/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-22T18:30:52Z","updated_at":"2015-09-22T23:54:27Z","closed_at":null,"body":"The `delete_by_query` call should exclude the document source from being retrieved when performing the scan operation. We only need the `index`, `type`, and `id` of the documents in order to delete them. Excluding source retrieval will reduce load on the search cluster, and it will reduce the size of our HTTP packets.\r\n\r\n```ruby\r\n@query = query.dup\r\n@query.delete :_source if @query.key? :_source\r\n@query.delete \"_source\" if @query.key? \"_source\"\r\n@query[:_source] = false \r\n```\r\n\r\nExample implementation to put into the `DeleteByQuery` initializer.\r\n\r\n/cc @chrismwendt @grantr"},"comment":{"url":"https://api.github.com/repos/github/elastomer-client/issues/comments/142455890","html_url":"https://github.com/github/elastomer-client/issues/117#issuecomment-142455890","issue_url":"https://api.github.com/repos/github/elastomer-client/issues/117","id":142455890,"user":{"login":"chrismwendt","id":1387653,"avatar_url":"https://avatars.githubusercontent.com/u/1387653?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismwendt","html_url":"https://github.com/chrismwendt","followers_url":"https://api.github.com/users/chrismwendt/followers","following_url":"https://api.github.com/users/chrismwendt/following{/other_user}","gists_url":"https://api.github.com/users/chrismwendt/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismwendt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismwendt/subscriptions","organizations_url":"https://api.github.com/users/chrismwendt/orgs","repos_url":"https://api.github.com/users/chrismwendt/repos","events_url":"https://api.github.com/users/chrismwendt/events{/privacy}","received_events_url":"https://api.github.com/users/chrismwendt/received_events","type":"User","site_admin":true},"created_at":"2015-09-22T23:54:27Z","updated_at":"2015-09-22T23:54:27Z","body":"According to https://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-request-source-filtering.html#search-request-source-filtering, the `_source` field was added in ES 1.0.0.Beta1."}}