From b52cf3d72fdac330a139ea83fad0da0249e62c98 Mon Sep 17 00:00:00 2001
From: Jan Semmelink <jan@uafrica.com>
Date: Mon, 29 Nov 2021 11:57:29 +0200
Subject: [PATCH] Update

---
 search/time_series.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/search/time_series.go b/search/time_series.go
index 1928432..c819fb9 100644
--- a/search/time_series.go
+++ b/search/time_series.go
@@ -472,14 +472,15 @@ func (ts *timeSeries) Search(query Query, limit int64) (docs map[string]interfac
 	return docs, hitsTotalValue.Interface().(int), nil
 }
 
-func (ds *timeSeries) Get(id string) (doc interface{}, err error) {
+func (ds *timeSeries) Get(indexSlashDocumentID string) (doc interface{}, err error) {
 	if ds == nil {
 		return nil, errors.Errorf("document store == nil")
 	}
+	parts := strings.SplitN(indexSlashDocumentID, "/", 2)
 	get := opensearchapi.GetRequest{
-		Index:        ds.name,
+		Index:        parts[0],
 		DocumentType: "_doc",
-		DocumentID:   id,
+		DocumentID:   parts[1],
 	}
 	getResponse, err := get.Do(context.Background(), ds.w.client)
 	if err != nil {
-- 
GitLab