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.
This commit is contained in:
committed by
Nick Lang
parent
f3f7266c1f
commit
b8c241d5ec
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user