{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/324","labels_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/324/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/324/events","html_url":"https://github.com/elastic/elasticsearch-rails/issues/324","id":55012902,"number":324,"title":"Elasticsearch::Persistence::Repository.search does not handle type _all properly","user":{"login":"alolis","id":82233,"avatar_url":"https://avatars.githubusercontent.com/u/82233?v=3","gravatar_id":"","url":"https://api.github.com/users/alolis","html_url":"https://github.com/alolis","followers_url":"https://api.github.com/users/alolis/followers","following_url":"https://api.github.com/users/alolis/following{/other_user}","gists_url":"https://api.github.com/users/alolis/gists{/gist_id}","starred_url":"https://api.github.com/users/alolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alolis/subscriptions","organizations_url":"https://api.github.com/users/alolis/orgs","repos_url":"https://api.github.com/users/alolis/repos","events_url":"https://api.github.com/users/alolis/events{/privacy}","received_events_url":"https://api.github.com/users/alolis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch-rails/labels/waiting","name":"waiting","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-21T12:35:56Z","updated_at":"2015-06-03T14:42:46Z","closed_at":null,"body":"I have set the `type` for my repository class to be `_all` but when i make the following call the wrong `GET` request is being produced:\r\n\r\n`my_repository.search(query: {match_all: {}})`\r\n\r\nThe above should make a `GET` request to `http://localhost:9200/my_index/_search` when `_all` type is set and not in `http://localhost:9200/my_index/_all/_search`"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/comments/108462875","html_url":"https://github.com/elastic/elasticsearch-rails/issues/324#issuecomment-108462875","issue_url":"https://api.github.com/repos/elastic/elasticsearch-rails/issues/324","id":108462875,"user":{"login":"alolis","id":82233,"avatar_url":"https://avatars.githubusercontent.com/u/82233?v=3","gravatar_id":"","url":"https://api.github.com/users/alolis","html_url":"https://github.com/alolis","followers_url":"https://api.github.com/users/alolis/followers","following_url":"https://api.github.com/users/alolis/following{/other_user}","gists_url":"https://api.github.com/users/alolis/gists{/gist_id}","starred_url":"https://api.github.com/users/alolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alolis/subscriptions","organizations_url":"https://api.github.com/users/alolis/orgs","repos_url":"https://api.github.com/users/alolis/repos","events_url":"https://api.github.com/users/alolis/events{/privacy}","received_events_url":"https://api.github.com/users/alolis/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T14:42:46Z","updated_at":"2015-06-03T14:42:46Z","body":"@karmi, I was going through the elastic docs and found this:\r\n\r\n```https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html\r\nThe get API allows for _type to be optional. Set it to _all in order to fetch the first document matching the id across all types.\r\n```\r\n\r\nSo it seams that `_all` is valid when you use the `GET` API, not the `Search` API (which I was using and noticed the issue."}}