From 21d14c5388df585db71107f647e85711a8dd5233 Mon Sep 17 00:00:00 2001 From: Alex Dransfield Date: Tue, 30 Jan 2018 11:02:01 +0000 Subject: [PATCH] Setting source_content_type on ES queries --- redash/query_runner/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redash/query_runner/elasticsearch.py b/redash/query_runner/elasticsearch.py index 8c8398b2..a32f7883 100644 --- a/redash/query_runner/elasticsearch.py +++ b/redash/query_runner/elasticsearch.py @@ -420,7 +420,7 @@ class ElasticSearch(BaseElasticSearch): if error: return None, error - params = {"source": json.dumps(query_dict)} + params = {"source": json.dumps(query_dict), "source_content_type": "application/json"} logger.debug("Using URL: %s", url) logger.debug("Using params : %s", params) r = requests.get(url, params=params, auth=self.auth)