From 9cafeeb6510837eb2c3ef3ec21e7000b392f53ba Mon Sep 17 00:00:00 2001 From: Yaser Martinez Palenzuela Date: Fri, 26 Apr 2019 00:10:47 +0200 Subject: [PATCH] Update docs to v7 (#923) --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"])