From eee5701dd0bf3cbdfe331f38e7cb0064d5b402fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Sun, 19 Apr 2015 17:28:20 +0200 Subject: [PATCH] Allow stats_only parameter to bulk from reindex to be overridden Fixes #218 --- elasticsearch/helpers/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elasticsearch/helpers/__init__.py b/elasticsearch/helpers/__init__.py index f80b6191..1f431fe8 100644 --- a/elasticsearch/helpers/__init__.py +++ b/elasticsearch/helpers/__init__.py @@ -298,5 +298,9 @@ def reindex(client, source_index, target_index, query=None, target_client=None, h['_index'] = index yield h + kwargs = { + 'stats_only': True, + } + kwargs.update(bulk_kwargs) return bulk(target_client, _change_doc_index(docs, target_index), - chunk_size=chunk_size, stats_only=True, **bulk_kwargs) + chunk_size=chunk_size, **kwargs)