Skip to content

Commit b8c241d

Browse files
osvalbanfxdgear
authored andcommitted
remove extraneous refresh() in example/load.py (elastic#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.
1 parent f3f7266 commit b8c241d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

example/load.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,5 @@ def load_repo(client, path=None, index='git'):
183183
initial_commit = es.get(index='git', doc_type='doc', id='20fbba1230cabbc0f4644f917c6c2be52b8a63e8')
184184
print('%s: %s' % (initial_commit['_id'], initial_commit['_source']['committed_date']))
185185

186-
187-
# refresh to make the documents available for search
188-
es.indices.refresh(index='git')
189-
190186
# and now we can count the documents
191187
print(es.count(index='git')['count'], 'documents in index')

0 commit comments

Comments
 (0)