diff --git a/server/modules/elastic/elasticeventstore.go b/server/modules/elastic/elasticeventstore.go index e200cfe1f..038eff661 100644 --- a/server/modules/elastic/elasticeventstore.go +++ b/server/modules/elastic/elasticeventstore.go @@ -231,7 +231,9 @@ func (store *ElasticEventstore) Scroll(ctx context.Context, criteria *model.Even indexes = strings.Split(store.index, ",") } - res, err := store.esClient.Search( + var res *esapi.Response + + res, err = store.esClient.Search( store.esClient.Search.WithContext(ctx), store.esClient.Search.WithIndex(indexes...), store.esClient.Search.WithBody(strings.NewReader(query)),