Skip to content

Commit

Permalink
Explicitly cast scroll size to integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrus0824 committed Oct 19, 2015
1 parent dc056ad commit 2806196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/www/api/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, index=None, doc_type=None, es_host=None):
self._total_scroll_size = 1000 # Total number of hits to return per scroll batch
if self._total_scroll_size % self.get_number_of_shards() == 0:
# Total hits per shard per scroll batch
self._scroll_size = self._total_scroll_size / self.get_number_of_shards()
self._scroll_size = int(self._total_scroll_size / self.get_number_of_shards())
else:
raise MVScrollSetupError("_total_scroll_size of {} can't be ".format(self._total_scroll_size) +
"divided evenly among {} shards.".format(self.get_number_of_shards()))
Expand Down

0 comments on commit 2806196

Please sign in to comment.