Using v6.3.1 I'm doing a multi_match query with a a filter and it's working, but not returning all the fields for the documents.
Here's the query:
GET /myindex/_doc/_search
{
"from": 0,
"size": 1,
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": "dress",
"fields": [ "name" ]
}
}
],
"filter": [
{ "term": { "shop.keyword": "a_6ojOupk0Y6ejlHfak0OGvj" } }
]
}
}
}
That correctly returns documents with a name containing "dress", but some of the fields are missing -- namely, an images field that contains an array of strings.
I'm able to get the images field in the result if I change the fields searched to be "fields": [ "name", "images" ]
or remove multi_match entirely. Additionally -- other arrays of strings from the same document are returned without issue.
Did I miss something in the docs? Should a multi_match search be changing which fields are returned for a document?
Edit: I might be a dummy and didn't confirm it was the same document being returned.... ugh. Will report back after I do that...