Elasticsearch: Fix using of individual query time ranges when querying (#84201)

* WIP - proof of concept

* Update pkg/tsdb/elasticsearch/client/client.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* update and add test

* lint

* Fix lint

* Bring back logging when creating client

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
This commit is contained in:
Ivana Huckova
2024-03-13 12:49:35 +02:00
committed by GitHub
co-authored by Sven Grossmann
parent 8ed4d5127f
commit 2a1a5145d0
10 changed files with 151 additions and 31 deletions
@@ -18,11 +18,11 @@ const (
intervalYearly = "yearly"
)
type indexPattern interface {
type IndexPattern interface {
GetIndices(timeRange backend.TimeRange) ([]string, error)
}
var newIndexPattern = func(interval string, pattern string) (indexPattern, error) {
var newIndexPattern = func(interval string, pattern string) (IndexPattern, error) {
if interval == noInterval {
return &staticIndexPattern{indexName: pattern}, nil
}