Smile\ElasticsuiteCatalog\Helper\Attribute::prepareSimpleIndexAttributeValue PHP Method

prepareSimpleIndexAttributeValue() private method

Ensure types of numerical values is correct before indexing.
private prepareSimpleIndexAttributeValue ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, mixed $value ) : mixed
$attribute Magento\Eav\Model\Entity\Attribute\AttributeInterface Product attribute.
$value mixed Raw value.
return mixed
    private function prepareSimpleIndexAttributeValue(AttributeInterface $attribute, $value)
    {
        if ($attribute->getBackendType() == 'decimal') {
            $value = floatval($value);
        } elseif ($attribute->getBackendType() == 'int') {
            $value = intval($value);
        }
        return $value;
    }