# "\[match\_phrase\] query doesn't support multiple fields

**URL:** <https://discuss.elastic.co/t/match-phrase-query-doesnt-support-multiple-fields/226175>\
**Category:** Elasticsearch\
**Created:** [April 2, 2020, 8:33am UTC](https://discuss.elastic.co/t/match-phrase-query-doesnt-support-multiple-fields/226175 "2020-04-02T08:33:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raady\_s](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raady_s/32/63176_2.png) [@Raady\_s](https://discuss.elastic.co/u/Raady_s)\
**Post date:** [April 2, 2020, 8:33am UTC](https://discuss.elastic.co/t/match-phrase-query-doesnt-support-multiple-fields/226175/1 "2020-04-02T08:33:14Z")

</div>

I have profiles which have fields ListExperience and derived(some have missing derived).  
I am making query in the elasticsearch so that it matches my title in ListExperience.Title and exists some values in derived.soc exists or not

```auto
 { "size": 10,
   "query": {
             "bool": {
                  "must": {
                           "match_phrase": {
                                     "ListExperiences.Title": "lead ios developer",
                                     "exists.soc":"derived" }}}}}

```

it gives me a parsing exception 400 error

```
  ` "[match_phrase] query doesn't support multiple fields, found [ListExperiences.Title] and [exists]"`
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 2, 2020, 1:07pm UTC](https://discuss.elastic.co/t/match-phrase-query-doesnt-support-multiple-fields/226175/2 "2020-04-02T13:07:52Z")

</div>

You can do a `bool` query with a `should` array which contains 2 `match_phrase` queries, one per field.

---

<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:** [April 30, 2020, 1:07pm UTC](https://discuss.elastic.co/t/match-phrase-query-doesnt-support-multiple-fields/226175/3 "2020-04-30T13:07:57Z")

</div>

Closed on April 30, 2020, 1:07pm UTC

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