Skip to content

Commit c2fc5aa

Browse files
committed
Be more explicit with stats_only behavior
1 parent ef3820c commit c2fc5aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

elasticsearch/helpers/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ def bulk(client, actions, stats_only=False, **kwargs):
168168
a more human friendly interface - it consumes an iterator of actions and
169169
sends them to elasticsearch in chunks. It returns a tuple with summary
170170
information - number of successfully executed actions and either list of
171-
errors or number of errors if `stats_only` is set to `True`.
171+
errors or number of errors if ``stats_only`` is set to ``True``. Note that
172+
by default we raise a ``BulkIndexError`` when we encounter an error so
173+
options like ``stats_only`` only apply when ``raise_on_error`` is set to
174+
``False``.
175+
172176
173177
See :func:`~elasticsearch.helpers.streaming_bulk` for more accepted
174178
parameters

0 commit comments

Comments
 (0)