{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/183","labels_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/183/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/183/events","html_url":"https://github.com/elastic/elasticsearch-dsl-py/issues/183","id":90616550,"number":183,"title":"Getting DocType from search result","user":{"login":"k4nar","id":2692721,"avatar_url":"https://avatars.githubusercontent.com/u/2692721?v=3","gravatar_id":"","url":"https://api.github.com/users/k4nar","html_url":"https://github.com/k4nar","followers_url":"https://api.github.com/users/k4nar/followers","following_url":"https://api.github.com/users/k4nar/following{/other_user}","gists_url":"https://api.github.com/users/k4nar/gists{/gist_id}","starred_url":"https://api.github.com/users/k4nar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k4nar/subscriptions","organizations_url":"https://api.github.com/users/k4nar/orgs","repos_url":"https://api.github.com/users/k4nar/repos","events_url":"https://api.github.com/users/k4nar/events{/privacy}","received_events_url":"https://api.github.com/users/k4nar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-24T09:05:05Z","updated_at":"2015-06-24T12:46:08Z","closed_at":null,"body":"When doing a multi-type search, is there any way to retrieve an instance of the DocType, or at least the class, from a `Result` object? There is `Result.meta.doc_type`, but this is a string."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/comments/114855916","html_url":"https://github.com/elastic/elasticsearch-dsl-py/issues/183#issuecomment-114855916","issue_url":"https://api.github.com/repos/elastic/elasticsearch-dsl-py/issues/183","id":114855916,"user":{"login":"HonzaKral","id":32132,"avatar_url":"https://avatars.githubusercontent.com/u/32132?v=3","gravatar_id":"","url":"https://api.github.com/users/HonzaKral","html_url":"https://github.com/HonzaKral","followers_url":"https://api.github.com/users/HonzaKral/followers","following_url":"https://api.github.com/users/HonzaKral/following{/other_user}","gists_url":"https://api.github.com/users/HonzaKral/gists{/gist_id}","starred_url":"https://api.github.com/users/HonzaKral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HonzaKral/subscriptions","organizations_url":"https://api.github.com/users/HonzaKral/orgs","repos_url":"https://api.github.com/users/HonzaKral/repos","events_url":"https://api.github.com/users/HonzaKral/events{/privacy}","received_events_url":"https://api.github.com/users/HonzaKral/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T12:46:08Z","updated_at":"2015-06-24T12:46:08Z","body":"It depends on how you are creating the `Search` object. Ideally you'd use a `DocType.search` or `Index.search` methods, that way all the results will return wrapped in the appropriate `DocType` class."}}