def scan(self):
    '\n        Turn the search into a scan search and return a generator that will\n        iterate over all the documents matching the query.\n\n        Use ``params`` method to specify any additional arguments you with to\n        pass to the underlying ``scan`` helper from ``elasticsearch-py`` -\n        https://elasticsearch-py.readthedocs.io/en/master/helpers.html#elasticsearch.helpers.scan\n\n        '
    es = get_connection(self._using)
    for hit in scan(es, query=self.to_dict(), index=self._index, **self._params):
        (yield self._get_result(hit))
Turn the search into a scan search and return a generator that will
iterate over all the documents matching the query.

Use ``params`` method to specify any additional arguments you with to
pass to the underlying ``scan`` helper from ``elasticsearch-py`` -
https://elasticsearch-py.readthedocs.io/en/master/helpers.html#elasticsearch.helpers.scan
def scan(self):
    '\n        Turn the search into a scan search and return a generator that will\n        iterate over all the documents matching the query.\n\n        Use ``params`` method to specify any additional arguments you with to\n        pass to the underlying ``scan`` helper from ``elasticsearch-py`` -\n        https://elasticsearch-py.readthedocs.io/en/master/helpers.html#elasticsearch.helpers.scan\n\n        '
    es = get_connection(self._using)
    for hit in scan(es, query=self.to_dict(), index=self._index, **self._params):
        (yield self._get_result(hit))