diff --git a/docs/index.rst b/docs/index.rst index eeff0a16..d8c01592 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -72,7 +72,7 @@ Example Usage es.indices.refresh(index="test-index") res = es.search(index="test-index", body={"query": {"match_all": {}}}) - print("Got %d Hits:" % res['hits']['total']) + print("Got %d Hits:" % res['hits']['total']['value']) for hit in res['hits']['hits']: print("%(timestamp)s %(author)s: %(text)s" % hit["_source"])