Wildcard query

Wildcard query #

Returns documents that contain terms matching a wildcard pattern. The pattern supports * (any sequence of characters, including none) and ? (any single character).

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

Examples #

POST /my-collection/_search
{
  "query": {
    "wildcard": {
      "field": "user.id",
      "value": "ki*y"
    }
  }
}

Parameters for wildcard #

  • <field>
    (Required, string) Field you wish to search.
  • value
    (Required, string) Wildcard pattern to match terms in the provided <field> against. Note: leading wildcards (*foo) are expensive — prefer the prefix query when possible.
  • case_insensitive
    (Optional, boolean, default: false) ASCII case-insensitive matching of the value with the indexed field values.
  • boost
    (Optional, float, default: 1.0) Decrease or increase the relevance scores of the query.
  • rewrite
    (Optional, string) Method used to rewrite the expanded terms (constant_score, scoring_boolean, …).
Calendar September 27, 2026
Edit Edit this page