From d8e1d207a24724142c528c19e15c95a7d3c2e069 Mon Sep 17 00:00:00 2001 From: Ivana Huckova Date: Mon, 28 Aug 2023 13:41:08 +0200 Subject: [PATCH] Unify default value --- pkg/tsdb/elasticsearch/client/search_request.go | 2 +- .../BucketAggregationsEditor/SettingsEditor/useDescription.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tsdb/elasticsearch/client/search_request.go b/pkg/tsdb/elasticsearch/client/search_request.go index cafd25f16f5..89159bbb747 100644 --- a/pkg/tsdb/elasticsearch/client/search_request.go +++ b/pkg/tsdb/elasticsearch/client/search_request.go @@ -452,7 +452,7 @@ func (b *aggBuilderImpl) Filters(key string, fn func(a *FiltersAggregation, b Ag func (b *aggBuilderImpl) GeoHashGrid(key, field string, fn func(a *GeoHashGridAggregation, b AggBuilder)) AggBuilder { innerAgg := &GeoHashGridAggregation{ Field: field, - Precision: 5, + Precision: 3, } aggDef := newAggDef(key, &aggContainer{ Type: "geohash_grid", diff --git a/public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/useDescription.ts b/public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/useDescription.ts index faa9c431780..1ca333e42e5 100644 --- a/public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/useDescription.ts +++ b/public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/useDescription.ts @@ -61,7 +61,7 @@ export const useDescription = (bucketAgg: BucketAggregation): string => { } case 'geohash_grid': { - const precision = Math.max(Math.min(parseInt(bucketAgg.settings?.precision || '5', 10), 12), 1); + const precision = Math.max(Math.min(parseInt(bucketAgg.settings?.precision || '3', 10), 12), 1); return `Precision: ${precision}`; }