Skip to content

Instantly share code, notes, and snippets.

@loretoparisi
Created August 30, 2021 13:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loretoparisi/7383a912686c56428849efe4e553758a to your computer and use it in GitHub Desktop.
Save loretoparisi/7383a912686c56428849efe4e553758a to your computer and use it in GitHub Desktop.

With wildcard

{
  "query": {
    "bool": {
      "must": [
        {
          "wildcard": {
            "text": "*antonio*banderas*"
          }
        }
      ]
    }
  }
}

With match

{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "text": "*antonio*banderas*"
          }
        }
      ]
    }
  }
}

With term

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "text": "*antonio*banderas*"
          }
        }
      ]
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment