# Multi\_match query for boolean fields is not work

**URL:** <https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292>\
**Category:** Elasticsearch\
**Created:** [August 7, 2018, 9:15am UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292 "2018-08-07T09:15:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vara0855](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@vara0855](https://discuss.elastic.co/u/vara0855)\
**Post date:** [August 7, 2018, 9:15am UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/1 "2018-08-07T09:15:34Z")

</div>

**Version ES 6.2.3.**

Index  
"\_index": "test",  
"\_type": "doc",  
"\_id": "test",  
"\_score": 1,  
"\_source": {  
"type": "my",  
"updated\_at": "2018-08-07T08:10:13.238Z",  
"my": {  
"title": "New My",  
"System wide": true,  
"Role wide": false,  
"Roles": []  
}  
}  
}  
I need to find all documents with "\*.System wide" field "true"  
My query:

GET test/\_search  
{  
"query": {"bool": {"must": [  
{  
"multi\_match": {  
"query": true,  
"fields": ["\*.System wide"]  
}  
}  
]}}  
}

What are the reasons for this behavior?  
The mapping of this field is  
....  
"System wide": {  
"type": "boolean"  
},  
....

---

<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:** [August 7, 2018, 9:43am UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/2 "2018-08-07T09:43:54Z")

</div>

It looks like a bug to me.

I reproduced it with:

```auto
DELETE index
PUT index/_doc/1
{
  "my": {
    "boolean": true,
    "text": "foo bar"
  }
}
GET index/_search
{
  "query": {
    "multi_match": {
      "query": true,
      "fields": ["my.*boolean"]
    }
  }
}
GET index/_search
{
  "query": {
    "multi_match": {
      "query": "foo",
      "fields": ["my.*text"]
    }
  }
}

```

The former query does not work but the later does.

Would you like to open an issue with the script I shared as a way to reproduce the problem?

---

<div class="post-metadata">

**Author:** ![vara0855](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@vara0855](https://discuss.elastic.co/u/vara0855)\
**Post date:** [August 7, 2018, 10:51am UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/3 "2018-08-07T10:51:43Z")

</div>

Yes. Where can I open issue?

---

<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:** [August 7, 2018, 11:22am UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/4 "2018-08-07T11:22:05Z")

</div>

> **[Build software better, together](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Felastic%2Felasticsearch%2Fissues%2Fnew)**
>
> GitHub is where people build software. More than 28 million people use GitHub to discover, fork, and contribute to over 85 million projects.

---

<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:** [August 7, 2018, 12:54pm UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/5 "2018-08-07T12:54:39Z")

</div>

Closing the loop here. As noted by @jimczi this issue has been reported here:

> <https://github.com/elastic/elasticsearch/issues/31798>

---

<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:** [September 4, 2018, 12:54pm UTC](https://discuss.elastic.co/t/multi-match-query-for-boolean-fields-is-not-work/143292/6 "2018-09-04T12:54:44Z")

</div>

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