I am trying to highlight the match words on two fields while the query searches on 1 filed.
for example, if I search for cancer in terms, I want the highlight in both terms and another filed pref_terms.
{
"highlight": {
"fields": [
{"terms" :{}},
{"pref_terms" :{}}
]
},
"query": {
"bool": {
"must": [
{
"match": {
"terms": {
"query": "cancer "
}
}
}
]
}
},
"sort": [
{
"_score": {
"order": "desc"
}
}
]
}