mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix for annotations query on ES 5.x
This commit is contained in:
parent
3057c9747c
commit
f844cd844b
@ -82,11 +82,15 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
|
||||
var query = { "bool": { "must": [{ "range": range }, { "query_string": { "query": queryInterpolated } }] }};
|
||||
|
||||
var data = {
|
||||
"fields": [timeField, "_source"],
|
||||
"query" : query,
|
||||
"size": 10000
|
||||
};
|
||||
|
||||
// fields field not supported on ES 5.x
|
||||
if (this.esVersion < 5) {
|
||||
data["fields"] = [timeField, "_source"];
|
||||
}
|
||||
|
||||
var header = {search_type: "query_then_fetch", "ignore_unavailable": true};
|
||||
|
||||
// old elastic annotations had index specified on them
|
||||
|
Loading…
Reference in New Issue
Block a user