Elasticsearch: Unify default value for geo hash grid precision across the code to 3 (#73922)

* Unify default value

* Use variable to keep default precisions in sync

* Use default precision variable

* Update precision description

* Update defaultPrecisionString and move

* Be more specific in naming of variabkle

* Revert "Merge remote-tracking branch 'origin' into ivana/es-precision-default-value"

This reverts commit 599f236a7717315a43434b88b50aea2fdfb502e3, reversing
changes made to 6742be0c6de6b735cf4a0b82143bc628a7622d87.

* Revert wrong merge

* Revert wrong merge with turned off lefthook
This commit is contained in:
Ivana Huckova
2023-08-28 16:38:44 +02:00
committed by GitHub
parent 116337f474
commit a80fd02f95
6 changed files with 19 additions and 6 deletions

View File

@ -269,7 +269,7 @@ func addFiltersAgg(aggBuilder es.AggBuilder, bucketAgg *BucketAgg) es.AggBuilder
func addGeoHashGridAgg(aggBuilder es.AggBuilder, bucketAgg *BucketAgg) es.AggBuilder {
aggBuilder.GeoHashGrid(bucketAgg.ID, bucketAgg.Field, func(a *es.GeoHashGridAggregation, b es.AggBuilder) {
a.Precision = stringToIntWithDefaultValue(bucketAgg.Settings.Get("precision").MustString(), 3)
a.Precision = stringToIntWithDefaultValue(bucketAgg.Settings.Get("precision").MustString(), es.DefaultGeoHashPrecision)
aggBuilder = b
})