We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go的sdk,签名不支持query中带有空格,例如query=default:'测试' AND tag:'1'
1、如果我自行url encode,开放搜索会提是错误6604:Query parse failed
// query=default:'测试' AND tag:'1' { "errors": [ { "code": 4003, "message": "Signature fail", "params": {} } ], "status": "FAIL", "request_id": "160931705716780264679308" }
2、如果我不对空格url encode,【sdk签名时】会转成+导致签名错误
// query=default:'测试'%20AND%20tag:'1' { "errors": [ { "code": 6604, "message": "Query parse failed, query[default:'测试'%20AND%20tag:'1']" } ] }
https://github.com/alibabacloud-go/opensearch-util/blob/f85abd70ca6464adad9e1b25f635ee54ce2759e9/service/service.go#L66-L76
url.QueryEscape之后空格变成了+导致和开放搜索的签名结果不一致。
url.QueryEscape
空格
+
alibabacloud-go/opensearch-util#1
把+转换成%20
%20
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题
go的sdk,签名不支持query中带有空格,例如query=default:'测试' AND tag:'1'
表现
1、如果我自行url encode,开放搜索会提是错误6604:Query parse failed
2、如果我不对空格url encode,【sdk签名时】会转成+导致签名错误
原因
https://github.com/alibabacloud-go/opensearch-util/blob/f85abd70ca6464adad9e1b25f635ee54ce2759e9/service/service.go#L66-L76
url.QueryEscape
之后空格
变成了+
导致和开放搜索的签名结果不一致。尝试修复PR
alibabacloud-go/opensearch-util#1
把
+
转换成%20
The text was updated successfully, but these errors were encountered: