# Field data type for multi\_match query with type phrase

**URL:** <https://discuss.elastic.co/t/field-data-type-for-multi-match-query-with-type-phrase/319652>\
**Category:** Elasticsearch\
**Created:** [November 23, 2022, 11:44am UTC](https://discuss.elastic.co/t/field-data-type-for-multi-match-query-with-type-phrase/319652 "2022-11-23T11:44:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChristopherHS](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@ChristopherHS](https://discuss.elastic.co/u/ChristopherHS)\
**Post date:** [November 23, 2022, 11:44am UTC](https://discuss.elastic.co/t/field-data-type-for-multi-match-query-with-type-phrase/319652/1 "2022-11-23T11:44:45Z")

</div>

Hello,

I have the following query:

```json
{
    "size": 40,
    "from": 0,
    "query": {
        "bool": {
            "must": [
                {
                    "multi_match": {
                        "query": "my search",
                        "fields": [
                            "title",
                            "actors.name",
                            "producer.name",
                            "categories.name",
                            "tags.name"
                        ],
                        "type": "best_fields",
                        "tie_breaker": 0.3
                    }
                }
            ],
            "should": [
                {
                    "multi_match": {
                        "query": "my search",
                        "fields": [
                            "title^6",
                            "actors.name^5",
                            "producer.name^4",
                            "categories.name^3",
                            "tags.name^2"
                        ],
                        "type": "phrase"
                    }
                }
            ],
            "filter": [
                {
                    "bool": {
                        "must": [
                            {
                                "term": {
                                    "segment": 1
                                }
                            }
                        ]
                    }
                }
            ]
        }
    }
}

```

Should I use search on the fields keyword or leave it as it is by default

```json
{
    "size": 40,
    "from": 0,
    "query": {
        "bool": {
            ...
            "should": [
                {
                    "multi_match": {
                        "query": "my search",
                        "fields": [
                            "title.keyword^6",
                            "actors.name.keyword^5",
                            "producer.name.keyword^4",
                            "categories.name.keyword^3",
                            "tags.name.keyword^2"
                        ],
                        "type": "phrase"
                    }
                }
            ],
            ...
        }
    }
}

```

Thanks for your help.

---

<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:** [December 21, 2022, 11:45am UTC](https://discuss.elastic.co/t/field-data-type-for-multi-match-query-with-type-phrase/319652/2 "2022-12-21T11:45:36Z")

</div>

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