foreach ($tokens as $token) { $tokenBool =
new BoolQuery();
foreach ($searchConfig as $item) { if ($this->elasticsearchHelper->
enabledMultilingualIndex()) { $config =
new SearchFieldConfig((string) $item['field'
],
(int) $item['ranking'
],
(bool) $item['tokenize'
]);
$field =
$this->helper->
getField($config->
getField(),
$this->productDefinition,
$this->productDefinition->
getEntityName(), false
);
$association =
$this->helper->
getAssociationPath($config->
getField(),
$this->productDefinition
);
$root =
$association ?
explode('.',
$association)[0
] : null;
if ($field instanceof TranslatedField
) { $this->
buildTranslatedFieldTokenQueries($tokenBool,
$token,
$config,
$context,
$root);
continue;
} $this->
buildTokenQuery($tokenBool,
$token,
$config,
$root);
continue;
} $ranking =
$item['ranking'
];