/**
* @internal
*/
public function __construct( private readonly TokenizerInterface
$tokenizer,
private readonly AbstractTokenFilter
$tokenFilter ) { } public function analyze(ProductEntity
$product, Context
$context, array
$configFields): AnalyzedKeywordCollection
{ $keywords =
new AnalyzedKeywordCollection();
foreach ($configFields as $configField) { $path =
$configField['field'
];
$isTokenize =
(bool) $configField['tokenize'
];
$ranking =
(int) $configField['ranking'
];
$values =
array_filter($this->
resolveEntityValue($product,
$path));
if ($isTokenize) { $nonScalarValues =
array_filter($values,
fn ($value) => !\
is_scalar($value));