I have a problem finding a solution for requesting Unicode special characters in an Elastic search.
When I create this index:
curl -XPUT http://localhost:9200/index/type/1 -d '{"name" : "Vrba u řeky"}'
and then I try to find the phrase "řeky", everything is fine:
curl -XGET 'http://localhost:9200/index/type/_search?pretty=1' -d '{"query" : {"text" : { "_all" : "řeky" }}}' { "took" : 1, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 0.10848885, "hits" : [ { "_index" : "index", "_type" : "type", "_id" : "1", "_score" : 0.10848885, "_source" : {"name" : "Vrba u řeky"} } ] } }
But when I try to search for the same word, I find nothing:
curl -XGET 'http://localhost:9200/index/type/_search?pretty=1' -d '{"query" : {"text" : { "_all" : "\\u0159eky" }}}'
How can one make elasticity accept shielded strings in queries instead of raw queries?
Thanks.
source share