From 32f23b6748c07c48d294cf626413c0565e1940e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Fri, 16 Jan 2015 23:33:38 +0100 Subject: [PATCH] Add some docs for scan mentioning passing extra args to search Fixes #186 Thanks jpshelley! --- elasticsearch/helpers/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/elasticsearch/helpers/__init__.py b/elasticsearch/helpers/__init__.py index 14121aad..a0ffcf36 100644 --- a/elasticsearch/helpers/__init__.py +++ b/elasticsearch/helpers/__init__.py @@ -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'