diff --git a/indexclient/client.py b/indexclient/client.py index 1e671711..17ea7dec 100644 --- a/indexclient/client.py +++ b/indexclient/client.py @@ -116,10 +116,10 @@ def get_with_params(self, params=None): return None else: raise e - if not response.json()['ids']: + if not response.json()['records']: return None - did = response.json()['ids'][0] - return Document(self, did) + json = response.json()['records'][0] + return Document(self, json=json) def list(self, limit=float("inf"), start=None, page_size=100): """ Returns a generator of document objects. """