863
}
864
865
>
typeMap, err := s.searchAttributesProvider.GetSearchAttributes(s.index, false)
visibility_store.go
866
>
if err != nil {
867
return nil, serviceerror.NewUnavailablef("unable to read search attribute types: %v", err)
868
}
869
871
>
Executions: make([]*store.InternalExecutionInfo, 0, len(searchResult.Hits.Hits)),
872
>
}
873
>
var lastHitSort []any
874
>
for _, hit := range searchResult.Hits.Hits {
875
>
workflowExecutionInfo, err := s.ParseESDoc(hit.Id, hit.Source, typeMap, namespace, chasmMapper)
876
>
if err != nil {
877
return nil, err
878
}
879
>
response.Executions = append(response.Executions, workflowExecutionInfo)
visibility_store.go
880
>
lastHitSort = hit.Sort
881
}
882
883
>
if len(searchResult.Hits.Hits) > 0 { // this means the response might not the last page
visibility_store.go
884
>
response.NextPageToken, err = s.serializePageToken(&visibilityPageToken{
885
>
SearchAfter: lastHitSort,
886
>
})
887
>
if err != nil {
888
return nil, err
889
}
890
}
891
893
}
894