Query String Query with wrong Lucene syntax

The forward slash is a reserved character in the query string query syntax for searching via regular expressions, so you need to escape it.

Instead of "/xyz" you need to use "\\/xyz"

Note that not even Kibana parses the user input for correctness. If you want to check beforehand that the query is valid, you could use Lucene’s StandardQueryParser to try to parse the query before sending it to ES.

Handing out the power of the query string to end users is dangerous. If you really need to provide them with some kind of free text search, consider using simple_query_string instead, as it will not throw any exceptions.

Read more here: Source link