From b8c241d5ec852a92b31fc73ad7c7bb5860ef67e6 Mon Sep 17 00:00:00 2001 From: Osvaldo Banuelos Date: Tue, 27 Nov 2018 09:26:23 -0800 Subject: [PATCH] remove extraneous refresh() in example/load.py (#876) After Git repo is loaded to ES through bulk(), Line 180 performs an index refresh to make documents available for searching. The same operation is then repeated in Line 188; remove this duplicate refresh. --- example/load.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/example/load.py b/example/load.py index 92c17178..b500f944 100644 --- a/example/load.py +++ b/example/load.py @@ -183,9 +183,5 @@ if __name__ == '__main__': initial_commit = es.get(index='git', doc_type='doc', id='20fbba1230cabbc0f4644f917c6c2be52b8a63e8') print('%s: %s' % (initial_commit['_id'], initial_commit['_source']['committed_date'])) - - # refresh to make the documents available for search - es.indices.refresh(index='git') - # and now we can count the documents print(es.count(index='git')['count'], 'documents in index')