Phrase Suggestor in two fields

does anyone know how to put the Phrase Suggestor query from elasticsearch to search in two fields at the same time?

I created the filter in the two fields (description and title) in my mapping of my index, but I was only able to make my query search in only one field.

My query:

{
"suggest": {
"text": "siti de vidio",
"simple_phrase": {
"phrase": {
"field": "descricao",
"size": 1,
"max_errors": 0.8,
"direct_generator": [
{
"field": "descricao",
"suggest_mode": "always",
"min_word_length": 1
}
],
"collate": {
"query": {
"source": {
"match": {
"{{field_name}}": {
"query": "{{suggestion}}",
"operator": "and"
}
}
}
},
"params": {"field_name" : "descricao"},
"prune": false
},
"highlight": {
"pre_tag": "",
"post_tag": "
"
}
}
}
}
}

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