Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 461 Bytes

searching-with-wildcards.md

File metadata and controls

38 lines (33 loc) · 461 Bytes

Searching with wildcards

Adding an asterisk for any characters (zero or more)

GET /products/_search
{
  "query": {
    "wildcard": {
      "tags.keyword": "Veg*ble"
    }
  }
}

Adding a question mark for any single character

GET /products/_search
{
  "query": {
    "wildcard": {
      "tags.keyword": "Veg?ble"
    }
  }
}
GET /products/_search
{
  "query": {
    "wildcard": {
      "tags.keyword": "Veget?ble"
    }
  }
}