How can I perform a multi-match query on a single index type, matching all fields while matching a single field.
Let say I have a books index type and I want to perform search on all of its fields that will match the genre field. For example search within "autobiography" genre..
my code
{
"query": {
"filtered": {
"query": {
"match": {
"genre": "autobiography"
},
"multi_match" : {
"query": "Johnny Appleseed",
"fields": ["author", "publication_date", "isbn", "genre"]
}
},
"filter": {
"type": {
"value": "books"
}
}
}
}
}