How to search for special characters


(Harish Ramanathan) #1

I am using Elasticsearch 2.1.1 and have fields with special characters - $, %, ., :, ;, @,&,+,-
I tried using bool, match, match phrase, query string, multi match query. None of the queries return back the documents containing the above special characters. Is there something I am missing here?


(Nik Everett) #2

match and match_phrase will work, but you have to make sure that the analyzer that you use for the field doesn't throw out the character. Have a look at the analysis section and the analysis api for ways to learn experiment with this.


(system) #3