Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat Req] Elasticsearch Adhoc filter query by query_string vs match_phrase #12447

Open
davewat opened this issue Jun 28, 2018 · 2 comments

Comments

@davewat
Copy link
Contributor

@davewat davewat commented Jun 28, 2018

Please include this information:

What Grafana version are you using? 5.2

What datasource are you using? Elasticsearch

What OS are you running grafana on? CentOS 7.4

What did you do? Adhoc filter in dashboard

What was the expected result? Cannot use the full power of Elasticsearch's Query DSL language

What happened instead? Limited to restrictive match_phrase configuration

Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab.

The adhoc query builder for Elasticsearch Data Source uses match_phrase. If instead used query_string, would provide enhanced query capabilities with adhoc queries (multiple match options per selected field, OR, grouped, wildcard), allowing a greater use of the Elasticsearch query capabilities, while maintaining the standard layout of the Adhoc query filters. Today, to use the more complex queries, you must edit each panel's Metric-Query-Lucene Query field to match, which is labor intensive for each dashboard panel.

We have been doing this for sometime with our large Elasticsearch cluster, but was waiting until after ES Alerting was released, to ensure there was no impact. Will submit a PR.

This was one of the most requested changes by our team related to using Grafana with Elasticsearch.

Ref:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

@davewat

This comment has been minimized.

Copy link
Contributor Author

@davewat davewat commented Jun 28, 2018

github1
Example of advanced Elasticsearch query capability.

@gretamosa

This comment has been minimized.

Copy link

@gretamosa gretamosa commented Jul 4, 2018

Related #10918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.