Query_string

Query string query

/ Query_string, / Query

Query string query #

Returns documents that match a compact query-syntax string, e.g. status:active AND title:search. The same parser powers the URI search parameter ?q=.

Inside a nested query: not supported yet — the clause is rejected with an HTTP 400 naming the offending clause.

How it works #

The query string is parsed with the classic query-string grammar and converted to native queries: bare and field-qualified terms become analyzed match queries, quoted phrases become phrase queries, and the boolean operators become bool clauses. Terms without a field: prefix go to default_field (or, when fields is set, the query fans out into a bool.should across those fields with their field^boost weights). The operator subset:

...