Elasticsearch.py scanerror

I'm having a similar problem with elasticsearch-py as in the discussion below, except for the fact that my problem is with the version 6.
Elasticsearch dsl (python) scanerror.
I am getting the following error:
elasticsearch.helpers.errors.ScanError: Scroll request has only succeeded on 43 shards out of 48.

Can this solution be applied to other versions?