$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'
];
if (!
str_contains($item['field'
], 'customFields'
)) { $searchField =
$item['field'
] . '.search';
$ngramField =
$item['field'
] . '.ngram';
} else { $searchField =
$item['field'
];