Skip to content

Multi Match Query

ignacio-alorre edited this page May 26, 2019 · 9 revisions

The multi_match query builds on the match query to allow multi-field queries:

GET /_search
{
  "query": {
    "multi_match" : {
      "query":    "this is a test", 
      "fields": [ "subject", "message" ] 
    }
  }
}

Where:

  • query: The query string
  • fields: The fields to be queried. Fields can be specified as wildcards

Example

GET /_search
{
  "query": {
    "multi_match" : {
      "query":    "Will Smith",
      "fields": [ "title", "*_name" ] 
    }
  }
}

Clone this wiki locally