0
ES 5では、「yabba/dabba」を検索したいとします。 docsには、バックスラッシュを使用して予約文字をエスケープすることが記載されています。しかし、私がそれをしたら、私は誤りを犯す。このクエリを実行すると、エラーが返されます:エラーの関連部分が返さエラスティック検索クエスチョンエスケープ
curl -XPOST "http://127.0.0.1:9200/messages/_search?pretty=true" --data-binary '{
"query": {
"bool": {
"must": [
{
"bool" : {
"should" : [
{
"query_string" : {
"query" : "yabba\/dabba"
}
}
]
}
}
]
}
}
}'
は次のとおりです。
"reason" : {
"type" : "query_shard_exception",
"reason" : "Failed to parse query [yabba/dabba]",
"index_uuid" : "hhldqVnWSDelNyMdtiF0kw",
"index" : "messages_201708291329",
"caused_by" : {
"type" : "parse_exception",
"reason" : "Cannot parse 'yabba/dabba': Lexical error at line 1, column 12. Encountered: <EOF> after : \"/dabba\"",
"caused_by" : {
"type" : "token_mgr_error",
"reason" : "Lexical error at line 1, column 12. Encountered: <EOF> after : \"/dabba\""
}
}