diff --git a/docs/reference/query-dsl/query-string-syntax.asciidoc b/docs/reference/query-dsl/query-string-syntax.asciidoc index 8a76d686b62..8a7b394b2e8 100644 --- a/docs/reference/query-dsl/query-string-syntax.asciidoc +++ b/docs/reference/query-dsl/query-string-syntax.asciidoc @@ -53,6 +53,25 @@ Be aware that wildcard queries can use an enormous amount of memory and perform very badly -- just think how many terms need to be queried to match the query string `"a* b* c*"`. +[WARNING] +======= +Pure wildcards `\*` are rewritten to <> queries for efficiency. +As a consequence, the wildcard `"field:*"` would match documents with an emtpy value + like the following: +``` +{ + "field": "" +} +``` +\... and would **not** match if the field is missing or set with an explicit null +value like the following: +``` +{ + "field": null +} +``` +======= + [WARNING] ======= Allowing a wildcard at the beginning of a word (eg `"*ing"`) is particularly