Skip to content

Commit

Permalink
fixup! Performance boost for bulk delete, and additional abstraction …
Browse files Browse the repository at this point in the history
…in utils
  • Loading branch information
Alex Francis committed Aug 5, 2015
1 parent c536531 commit b2952a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bungiesearch/utils.py
Expand Up @@ -34,6 +34,7 @@ def update_index(model_items, model_name, action='index', bulk_size=100, num_doc
for index_name in src.get_index(model_name):
index_instance = src.get_model_index(model_name)
model = index_instance.get_model()

if num_docs == -1:
if isinstance(model_items, (list, tuple)):
num_docs = len(model_items)
Expand Down

0 comments on commit b2952a6

Please sign in to comment.