Skip to content
Snippets Groups Projects
Commit b52cf3d7 authored by Jan Semmelink's avatar Jan Semmelink
Browse files

Update

parent 83f3c398
No related branches found
No related tags found
1 merge request!14Resolve "Return unique id for search documents"
This commit is part of merge request !14. Comments created here will be created in the context of that merge request.
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment