Elasticsearch Search API Multi search


Example

The multi_search option allows us to search for a query in multiple fields at once.

GET /_search
{
  "query": {
    "multi_match" : {
      "query":    "text to search", 
      "fields": [ "field_1", "field_2" ] 
    }
  }
}

We can also boost the score of certain fields using the boost operator(^), and use wild cards in the field name (*)

GET /_search
    {
      "query": {
        "multi_match" : {
          "query":    "text to search", 
          "fields": [ "field_1^2", "field_2*" ] 
        }
      }
    }