Multi_match query for boolean fields is not work

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"
},
....

It looks like a bug to me.

I reproduced it with:

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?

1 Like

Yes. Where can I open issue?

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

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