Elasticsearch char_filter replace any character wi

2020-03-01 09:46发布

I'm using elasticsearch for my Ruby on Rails application. I want to use char_filter to replace some characters with whitepace.

In tutorial of elasticsearch it says something like:

"mappings" : ["ph=>f", "qu=>q"]

I've tried the following:

"mappings" : ["ph=>\s", "qu=>\s"]

However it does not seem to work. Any ideas guys?

1条回答
地球回转人心会变
2楼-- · 2020-03-01 10:09

You can use \uXXXX notation for spaces:

"mappings" : ["ph=>\s", "qu=>\\u0020"]
查看更多
登录 后发表回答