mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
elasticsearch: add 7.x version support (#16646)
Adds a new version option 7.0+ (70 internally). Version 7.0+ doesn't include document types in index mappings so support for handling this have been added. Version 7.0+ returns number of hits in a different way so support for handling this have been added. Version 7.0+ doesn't support sending max_concurrent_shard_requests in multisearch header so support for sending this in query string have been added. Update elastic6 docker block and dashboards (devenv) to use 6.7.1 images, filebeat index name is now filebeat-YYYY.MM.DD and dashboard include correct tags and links. Add elastic7 docker block and provisioning (devenv). Updates documentation regarding new version. Closes #15622
This commit is contained in:
committed by
Marcus Efraimsson
parent
42b745a098
commit
cff2be0d66
@@ -184,7 +184,7 @@ export class ElasticResponse {
|
||||
}
|
||||
|
||||
// This is quite complex
|
||||
// need to recurise down the nested buckets to build series
|
||||
// need to recurse down the nested buckets to build series
|
||||
processBuckets(aggs, target, seriesList, table, props, depth) {
|
||||
let bucket, aggDef, esAgg, aggId;
|
||||
const maxDepth = target.bucketAggs.length - 1;
|
||||
@@ -310,11 +310,13 @@ export class ElasticResponse {
|
||||
}
|
||||
|
||||
processHits(hits, seriesList) {
|
||||
const hitsTotal = typeof hits.total === 'number' ? hits.total : hits.total.value; // <- Works with Elasticsearch 7.0+
|
||||
|
||||
const series = {
|
||||
target: 'docs',
|
||||
type: 'docs',
|
||||
datapoints: [],
|
||||
total: hits.total,
|
||||
total: hitsTotal,
|
||||
filterable: true,
|
||||
};
|
||||
let propName, hit, doc, i;
|
||||
|
||||
Reference in New Issue
Block a user