[ES from entry to actual combat] Thirteen, full-text search-ElasticSearch-advanced-multi_match multi-field matching

Continue 12 sessions

5), multi_match [multi-field matching]

Example: state or address contains mill

GET /bank/_search
{
    
    
  "query": {
    
    
    "multi_match": {
    
    
      "query": "mill",
      "fields": ["address","state"]
    }
  }
}

Insert picture description here

Word segmentation will also be performed during multi-field query, with the highest score in the front:

GET /bank/_search
{
    
    
  "query": {
    
    
    "multi_match": {
    
    
      "query": "mill movico",
      "fields": ["address","city"]
    }
  }
}

Insert picture description here

Reference document-query-dsl


reference:

Elasticsearch Reference

elastic

Getting started with the full-text search engine Elasticsearch

Guess you like

Origin blog.csdn.net/runewbie/article/details/106343813