diff --git a/eZ/Publish/API/Repository/Tests/FieldType/FloatIntegrationTest.php b/eZ/Publish/API/Repository/Tests/FieldType/FloatIntegrationTest.php index 98518a0ca5..42b960a787 100644 --- a/eZ/Publish/API/Repository/Tests/FieldType/FloatIntegrationTest.php +++ b/eZ/Publish/API/Repository/Tests/FieldType/FloatIntegrationTest.php @@ -351,10 +351,8 @@ protected function getValidSearchValueTwo() return 25.59; } - protected function getFullTextIndexedFieldData() + public function checkFullTextSupport(): bool { - return [ - ['25.519', '25.59'], - ]; + return false; } } diff --git a/eZ/Publish/Core/FieldType/Float/Type.php b/eZ/Publish/Core/FieldType/Float/Type.php index 8a7c700120..db85776115 100644 --- a/eZ/Publish/Core/FieldType/Float/Type.php +++ b/eZ/Publish/Core/FieldType/Float/Type.php @@ -219,10 +219,12 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} + * + * @param \eZ\Publish\Core\FieldType\Float\Value $value */ protected function getSortInfo(BaseValue $value) { - return false; + return $value->value; } /** @@ -256,4 +258,9 @@ public function toHash(SPIValue $value) return $value->value; } + + public function isSearchable(): bool + { + return true; + } } diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php b/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php index fb9a875599..4f4433af66 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php @@ -42,7 +42,7 @@ public static function create() public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) { $storageFieldValue->dataFloat = $value->data; - $storageFieldValue->sortKeyInt = $value->sortKey; + $storageFieldValue->sortKeyString = $value->sortKey; } /** @@ -54,7 +54,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) { $fieldValue->data = $value->dataFloat; - $fieldValue->sortKey = $value->sortKeyInt; + $fieldValue->sortKey = $value->sortKeyString; } /** @@ -112,7 +112,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin */ public function getIndexColumn() { - return 'sort_key_int'; + return 'sort_key_string'; } /**