[v10.0.x] Elasticsearch: Handle no-index case in backend mode (#68629)
Elasticsearch: Handle no-index case in backend mode (#68534)
* elastic: backend migration: fix no-index case
* improved code
(cherry picked from commit fcef387151)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
This commit is contained in:
co-authored by
Gábor Farkas
parent
3c1b5dda40
commit
21e2ac6d8a
@@ -35,7 +35,11 @@ type staticIndexPattern struct {
|
||||
}
|
||||
|
||||
func (ip *staticIndexPattern) GetIndices(timeRange backend.TimeRange) ([]string, error) {
|
||||
return []string{ip.indexName}, nil
|
||||
if ip.indexName != "" {
|
||||
return []string{ip.indexName}, nil
|
||||
} else {
|
||||
return []string{}, nil
|
||||
}
|
||||
}
|
||||
|
||||
type intervalGenerator interface {
|
||||
|
||||
Reference in New Issue
Block a user