Reputation: 893
Does elasticsearch not support query cjk character in url ? I need to query term 北京(Beijing in chinese) for field(name) in index (old_merge_result). The following query seems not working. ES would retur
GET /old_merge_result/tempid/_search?q=name:北京
ES would return :
{
"statusCode": 400,
"error": "Bad Request",
"message": "child \"uri\" fails because [\"uri\" must be a valid uri]",
"validation": {
"source": "query",
"keys": [
"uri"
]
}
}
Instead, query through the following would return exactly what i want.
GET /old_merge_result/tempid/_search
{
"query": {
"term": {
"name": {
"value": "北京"
}
}
}
}
So is there any way query through url like old_merge_result/tempid/_search?q=name:北京 ?
Upvotes: 1
Views: 147
Reputation: 17441
One needs to use percent-encoding/URL-encoding to pass cjk characters as query parameters
For the above example it would be :
GET /old_merge_result/tempid/_search?q=name:%E5%8C%97%E4%BA%AC
Upvotes: 1