Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Multi Match Query

More info about multi match query is in the official elasticsearch docs

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

Simple example

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

In DSL:

$multiMatchQuery = new MultiMatchQuery(
    ['subject', 'message'],
    'this is a test'
);

$search = new Search();
$search->addQuery($multiMatchQuery);

$queryArray = $search->toArray();