ElasticSearch query fails on ES 6
See original GitHub issueIssue Summary
Using the public docker images which seem to be based on Redash 4 (beta?) trying to setup a query for an ES 6 backend results in
Error running query: Failed to execute query. Return Code: 500 Reason: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"}],"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"},"status":500}
Steps to Reproduce
- Deploy redash using the redash docker compose file
- Deploy ES 6 backend
- Setup ElasticSearch datasource in Redash
- Try a simple query
Technical details:
- Redash Version: 4.0.0 (not sure about the exact built number - can’t determine it from the docker image)
- Browser/OS: Redash in docker on Ubuntu 17.10
- How did you install Redash: redash docker compose file from github pulling in redash:latest from docker hub
Looks like redash uses the source
query parameter but as per https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html this also requires to provide a source_content_type
parameter.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
When Elasticsearch rejects a request, it stops the operation and returns an error with a 429 response code. Task queue backlog: A backlogged...
Read more >Fix common cluster issues | Elasticsearch Guide [7.17] | Elastic
Shards often become unassigned when a data node leaves the cluster. This can occur for several reasons, ranging from connectivity issues to hardware...
Read more >Query DSL | Elasticsearch Guide [8.5] | Elastic
Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST...
Read more >Advanced tuning: finding and fixing slow Elasticsearch queries
Problem. Queries are targeting too many shards, exceeding the number of cores in the cluster. This creates queued tasks in the search thread ......
Read more >Search API | Elasticsearch Guide [8.5] | Elastic
This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RichardLitt Is this really a support issue?
If I go to the relevant line and add the appropriate content type for my query, i.e. change it to;
params = {"source": json.dumps(query_dict), "source_content_type": "application/json"}
then my queries execute as expected.
@chriswue Did you get around this?
Opened support thread: https://discuss.redash.io/t/connecting-redash-4-to-elasticsearch-6/1412