Elasticsearch char_filter replace any character with whitespace?
Asked Answered
S

1

17

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?

Sinuous answered 19/3, 2013 at 13:58 Comment(0)
I
32

You can use \uXXXX notation for spaces:

"mappings" : ["ph=>\s", "qu=>\\u0020"]
Incurious answered 19/3, 2013 at 20:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.