diff --git a/_query-dsl/query-dsl/term.md b/_query-dsl/query-dsl/term.md index 38a43f9709..b31cb5ba62 100644 --- a/_query-dsl/query-dsl/term.md +++ b/_query-dsl/query-dsl/term.md @@ -405,6 +405,7 @@ Feature | Behavior :--- | :--- `*` | Specifies all valid values. `?` | Specifies a single valid value. +`case_insensitive` | If `true`, the wildcard query is case insensitive. If `false`, the wildcard query is case sensitive. Optional. Default is `true` (case insensitive). To search for terms that start with `H` and end with `Y`: @@ -420,6 +421,22 @@ GET shakespeare/_search } } ``` + +Use the following request for a case-sensitive term search: +```json +GET shakespeare/_search +{ + "query": { + "wildcard": { + "speaker": { + "value": "H*Y", + "case_insensitive": false + } + } + } +} +``` + {% include copy-curl.html %} If we change `*` to `?`, we get no matches, because `?` refers to a single character.