protected function prepareSuggestParams(array $arParams) {
$params = [
'index' => $this->index,
'body' => [
'my_suggest' => [
'text' => $arParams['text'],
'phrase' => [
'field' => 'FIELDS.SUGGEST_COMBINED',
'size' => 2,
'gram_size' => 1,
'real_word_error_likelihood' => 0.5,
'separator' => ' ',
'max_errors' => 2,
"direct_generator" => [
[
"field" => "FIELDS.SUGGEST_COMBINED",
'prefix_len' => 0,
'max_edits' => 1
]
],
"collate" => [
"query" => [
"match" => [
"{{field_name}}" => [
"query" => "{{suggestion}}",
"operator" => "and"
]
]
],
"params" => [
"field_name" => "FIELDS.SUGGEST_COMBINED"
],
"prune" => true
]
]
]
]
];
return $params;
}