docs: def validate_scan_result(results):
          """ Check if there's a failed shard in the scan query"""
          if results[EsConst.SHARDS][EsConst.FAILED] and results[EsConst.SHARDS][EsConst.FAILED] > 0:
              raise ScanError(
                  'Scroll request has failed on %d shards out of %d.' %
                  (results[EsConst.SHARDS][EsConst.FAILED], results[EsConst.SHARDS][EsConst.TOTAL])
              )