Search eith string_query for special charcters in not_analyzed fields


I am storing strings containing special characters in a not_analyzed field.
In order to search with query_string on this field I am escaping the
special characters. I tried tow approach. But both seem to work only



String regex = "([+\-!\(\){}\[\]^"~*?:\\]|[&\|]{2})";
value = value.replaceAll(regex, "\\$1");

Escaping works fine for: -,/,'^

But not for: +,:,|,",*,\

Is there a way that I can search for Strings containing these characters.

Thanks for you help,


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit