You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When we use the Elastic or OpenSearch Golang clients to search some indexes in this pattern: gh-archive*, will get a error message: "message":"index ID pattern gh-archive%2Ais invalid. patterns must match the following regular expression:^[a-zA-Z\][a-zA-Z0-9-_\.\]{0,254}$"
Steps to reproduce (if applicable)
Steps to reproduce the behavior:
use the Elastic and Opensearch client to query Quickwit
Golang code
// elastic client 7.x, 8.x// opensearch 2.*client, err:=elasticsearch.NewClient(elasticsearch.Config{
Addresses: []string{"http://127.0.0.1:7280/api/v1/_elastic"},
})
iferr!=nil {
fmt.Println(err)
}
index:="gh-archive*"queryBody:="{\n\"query\": {\n\"bool\": {\n\"filter\": [\n {\n\"match_phrase\": {\n\"id\": {\n\"query\": \"32230578641\"\n }\n }\n }\n ]\n }\n }\n}"res, err:=client.Search(
client.Search.WithIndex(index),
client.Search.WithBody(strings.NewReader(queryBody)),
)
iferr!=nil {
fmt.Println(err.Error())
return
}
fmt.Println(res)
{
"message": "index ID pattern `gh-archive%2A` is invalid. patterns must match the following regular expression: `^[a-zA-Z\\*][a-zA-Z0-9-_\\.\\*]{0,254}$`"
}
This issue seems unique to the Golang client; clients in other programming languages like Python and Java don't have this problem. I've looked through the Golang client's code and couldn't find any part where it's using URL encoding. But, based on the output we're seeing, it looks like the Golang client is URL encoding the asterisk (*).
So, to fix this, I think Quickwit should decode the URLs in all its search indices to get them back to their original format.
Describe the bug
When we use the Elastic or OpenSearch Golang clients to search some indexes in this pattern:
gh-archive*
, will get a error message:"message":"index ID pattern
gh-archive%2Ais invalid. patterns must match the following regular expression:
^[a-zA-Z\][a-zA-Z0-9-_\.\]{0,254}$"
Steps to reproduce (if applicable)
Steps to reproduce the behavior:
use the Elastic and Opensearch client to query Quickwit
Golang code
This issue seems unique to the Golang client; clients in other programming languages like Python and Java don't have this problem. I've looked through the Golang client's code and couldn't find any part where it's using URL encoding. But, based on the output we're seeing, it looks like the Golang client is URL encoding the asterisk (*).
So, to fix this, I think Quickwit should decode the URLs in all its search indices to get them back to their original format.
quickwit/quickwit/quickwit-config/src/lib.rs
Line 125 in 8a40a4d
The text was updated successfully, but these errors were encountered: