Skip to content

Commit 34343dd

Browse files
committed
elastic#5 adds scroll cleanup test
1 parent 5b629a2 commit 34343dd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

elasticsearch_async/helpers.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ def __init__(self, client, query=None, scroll='5m', raise_on_error=True,
3434
maintained for scrolled search
3535
raise_on_error (bool): if to raise ``ScanError`` when some shards fail.
3636
``True`` by default
37-
preserve_order (): don't set the ``search_type`` to ``scan`` — this will
38-
cause the scroll to paginate with preserving the order. Note that this
39-
can be an extremely expensive operation and can easily lead to
40-
unpredictable results, use with caution # TODO: type? human-readable doc?
37+
preserve_order (bool): if to preserve sorting from query.
38+
If set to ``False``, documents will be sorted by ``doc`` —
39+
this leverages internal optimization for faster scrolling.
40+
Setting this to ``True`` may be extremely expensive.
41+
``False`` by default
4142
size (int): Batch size (per shard) for every iteration
42-
request_timeout (): explicit timeout for each call to ``scan`` # TODO: type?
43+
request_timeout (str): explicit timeout for each call to ``scan``.
44+
Must correspond ``Time units`` format, look to
45+
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units
46+
for details
4347
clear_scroll (bool): if to delete scroll state in ES after getting
4448
error or consuming all results. Default is ``True``
4549
scroll_kwargs (dict): additional kwargs to be passed to

0 commit comments

Comments
 (0)