Add some docs for scan mentioning passing extra args to search
Fixes #186 Thanks jpshelley!
This commit is contained in:
@@ -172,7 +172,14 @@ def scan(client, query=None, scroll='5m', preserve_order=False, **kwargs):
|
||||
unpredictable results, use with caution.
|
||||
|
||||
Any additional keyword arguments will be passed to the initial
|
||||
:meth:`~elasticsearch.Elasticsearch.search` call.
|
||||
:meth:`~elasticsearch.Elasticsearch.search` call::
|
||||
|
||||
scan(es,
|
||||
query={"match": {"title": "python"}},
|
||||
index="orders-*",
|
||||
doc_type="books"
|
||||
)
|
||||
|
||||
"""
|
||||
if not preserve_order:
|
||||
kwargs['search_type'] = 'scan'
|
||||
|
||||
Reference in New Issue
Block a user