How to ignore special characters in a search query?

I'm using ES with fairly default settings, I think pretty much the only thing I changed was setting 'analyzer' => 'english'

If a user enters a [ character (or some of the other special chars) into the text in their search query, ES throws an exception (I'm using elasticsearch-php). Is there a simple way (without reading hours of ES theory) to simply have ES ignore special characters? My users are never going to use them.

It's kind of strange to me that this is default behaviour (to give an error), considering 99% of end users would never know about about using special chars.

I tried the "lenient" option, but that didn't help.

Thanks for any insights you might be able to give.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.