# Named multi match query

**URL:** <https://discuss.elastic.co/t/named-multi-match-query/286904>\
**Category:** Elasticsearch\
**Created:** [October 17, 2021, 3:35am UTC](https://discuss.elastic.co/t/named-multi-match-query/286904 "2021-10-17T03:35:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Llermaly](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gustavo_llermaly/32/92019_2.png) [@Gustavo\_Llermaly](https://discuss.elastic.co/u/Gustavo_Llermaly)\
**Post date:** [October 17, 2021, 3:35am UTC](https://discuss.elastic.co/t/named-multi-match-query/286904/1 "2021-10-17T03:35:59Z")

</div>

Hello everyone , I need a hand here. I have a cross\_fields multi\_match query and I need to use named queries for each field. I can rewrite it into a bool/should match but then I dont know how to reproduce the cross\_fields condition. Any idea? Thanks!

Multimatch query: Relevance OK, but no named queries

```auto
GET test_index/_search
{
  "query": {
    "multi_match": {
      "query": "example_query",
      "fields": ["name","lastname"],
      "type": "cross_fields"
    }
  }
}

```

Bool query: Named queries OK but bad relevance

```auto
GET test_index/_search
{
  "query": {
    "bool": {
      "should": [
        {
          "match": {
            "name": {
              "query": "example query",
              "_name": "name_match"
            }
          }
        },
        {
          "match": {
            "latname": {
              "query": "example query",
              "_name": "latname_match"
            }
          }
        }
      ]
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 14, 2021, 3:36am UTC](https://discuss.elastic.co/t/named-multi-match-query/286904/2 "2021-11-14T03:36:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
