Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch char_filter replace any character with whitespace?

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?

like image 563
İlker İnanç Avatar asked Mar 19 '13 13:03

İlker İnanç


1 Answers

You can use \uXXXX notation for spaces:

"mappings" : ["ph=>\s", "qu=>\\u0020"]
like image 63
imotov Avatar answered Nov 06 '22 21:11

imotov