$query = [
'query' => [
'bool' => [
'should' => [],
],
],
];
$fields = ['name_original'];
foreach ($fields as $field) {
$matchQuery = [
'query_string' => [
'default_field' => $field,
'query' => '*' . $keyword . '*',
'fuzziness' => 'AUTO',
],
];
$query['query']['bool']['should'][] = $matchQuery;
}
you need to search for a word written with an error, ‘fuzziness’ => ‘AUTO’ seems to be responsible for this, but for some reason it does not work
tried fuzziness’ => ‘AUTO’, analyzers, replaced query_string with match