[ 'excludedFields' => ArrayParameterType::STRING,
] );
if (!
empty($config)) { return $config;
} } throw ElasticsearchProductException::
configNotFound();
} private function buildTokenQuery(BoolQuery
$tokenBool, string
$token, SearchFieldConfig
$config, ?string
$root = null
): void
{ $queries =
[];
$searchField =
$config->
isCustomField() ?
$config->
getField() :
$config->
getField() . '.search';
$queries[] =
new MatchQuery($searchField,
$token,
['boost' => 5 *
$config->
getRanking()]);
$queries[] =
new MatchPhrasePrefixQuery($searchField,
$token,
['boost' =>
$config->
getRanking(), 'slop' => 5
]);
$queries[] =
new WildcardQuery($searchField, '*' .
$token . '*'
);