Commit 37515f36 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Configure Elasticsearch client with number decoder

- Add number decoder to Elasticsearch client configuration
- Ensure proper parsing of numeric fields in Elasticsearch responses
parent 1d79c3d3
...@@ -39,6 +39,7 @@ func CreateEsClientFromEnv() (*es.Client, error) { ...@@ -39,6 +39,7 @@ func CreateEsClientFromEnv() (*es.Client, error) {
opts = append(opts, es.SetBasicAuth(esUsername, esPassword)) opts = append(opts, es.SetBasicAuth(esUsername, esPassword))
} }
opts = append(opts, es.SetTraceLog(&log.Logger)) opts = append(opts, es.SetTraceLog(&log.Logger))
opts = append(opts, es.SetDecoder(&es.NumberDecoder{}))
sniff := os.Getenv("ELASTIC_SNIFF") sniff := os.Getenv("ELASTIC_SNIFF")
if sniff == "" { if sniff == "" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment