SearchParseException for query strings with parens in them?

Once we started getting more realistic data into our ElasticSearch index
for manual testing purposes, we ran into SearchPhaseExecutionException for
queries containing a paren.

Example query:

curl -X GET 'http://localhost:9200/myindex/mytype/_search?' -d

Error message:

SearchPhaseExecutionException[Failed to execute phase [query_fetch], total
failure; shardFailures {[JJfyNzxcR4WKsY-0nJdoJA][dpla][0]:
SearchParseException[[dpla][0]: from[-1],size[-1]: Parse Failure [Failed to
parse source
nested: QueryParsingException[[dpla] Failed to parse query [town(]];
nested: ParseException[Cannot parse 'town(': Encountered "" at line 1,
column 5.
Was expecting one of:

What's the best practice for preventing parse errors like this. Is there
documentation on this situation/requirement?

Thanks all!


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
For more options, visit