} private function addFacet(ProductAttributeFacet
$criteriaPart, Search
$search): void
{ $field = 'attributes.core.' .
$criteriaPart->
getField();
$type = null;
try { $attribute =
$this->crudService->
get('s_articles_attributes',
$criteriaPart->
getField());
if ($attribute instanceof ConfigurationStruct
) { $type =
$attribute->
getElasticSearchType()['type'
];
} } catch (Exception
$e) { } $this->criteriaParts
[] =
$criteriaPart;
switch ($criteriaPart->
getMode()) { case ProductAttributeFacet::MODE_VALUE_LIST_RESULT:
case ProductAttributeFacet::MODE_RADIO_LIST_RESULT:
if ($type === 'string'
) { $field .= '.raw';
}