diff --git a/modules/search_api_db/src/Plugin/search_api/backend/Database.php b/modules/search_api_db/src/Plugin/search_api/backend/Database.php
index 1f9e571d..a53afbd3 100644
--- a/modules/search_api_db/src/Plugin/search_api/backend/Database.php
+++ b/modules/search_api_db/src/Plugin/search_api/backend/Database.php
@@ -917,7 +917,7 @@ protected function fieldsUpdated(IndexInterface $index) {
             if ($field['boost']) {
               $multiplier = $new_fields[$field_id]->getBoost() / $field['boost'];
               $this->database->update($text_table)
-                ->expression('score', 'score * :mult', array(':mult' => $multiplier))
+                ->expression('score', 'CAST((score * :mult) AS UNSIGNED INTEGER)', array(':mult' => $multiplier))
                 ->condition('field_name', self::getTextFieldName($field_id))
                 ->execute();
             }
diff --git a/modules/search_api_db/tests/src/Kernel/BackendTest.php b/modules/search_api_db/tests/src/Kernel/BackendTest.php
index 1fad980e..670b7178 100644
--- a/modules/search_api_db/tests/src/Kernel/BackendTest.php
+++ b/modules/search_api_db/tests/src/Kernel/BackendTest.php
@@ -77,6 +77,7 @@ protected function checkBackendSpecificFeatures() {
   protected function backendSpecificRegressionTests() {
     $this->regressionTest2557291();
     $this->regressionTest2511860();
+    $this->regressionTest2846932();
   }
 
   /**
@@ -462,6 +463,17 @@ protected function regressionTest2511860() {
   }
 
   /**
+   * Tests changing a field boost to a floating point value.
+   *
+   * @see https://www.drupal.org/node/2846932
+   */
+  protected function regressionTest2846932() {
+    $index = $this->getIndex();
+    $index->getField('body')->setBoost(0.8);
+    $index->save();
+  }
+
+  /**
    * {@inheritdoc}
    */
   protected function checkIndexWithoutFields() {
diff --git a/src/Entity/Task.php b/src/Entity/Task.php
index c02e807d..b7d3384d 100644
--- a/src/Entity/Task.php
+++ b/src/Entity/Task.php
@@ -139,7 +139,23 @@ public function getData() {
     if (!isset($this->unserializedData)) {
       $data = $this->get('data')[0];
       if ($data) {
+        //DEBUG
+        if (!@unserialize($data->value) && $data->value !== serialize(FALSE)) {
+          $debug = [
+            'type' => $this->getType(),
+            'server' => $this->getServerId(),
+            'index' => $this->getIndexId(),
+            'data' => $data->value,
+          ];
+          trigger_error("Could not unserialize task data: " . var_export($debug, TRUE), E_USER_WARNING);
+        }
+        //DEBUG END
         $this->unserializedData = unserialize($data->value);
+        if (!empty($this->unserializedData['#entity_type'])) {
+          $this->unserializedData = \Drupal::entityTypeManager()
+            ->getStorage($this->unserializedData['#entity_type'])
+            ->create($this->unserializedData['#values']);
+        }
       }
     }
 
diff --git a/src/Task/TaskManager.php b/src/Task/TaskManager.php
index 7706a9da..9bb94fc0 100644
--- a/src/Task/TaskManager.php
+++ b/src/Task/TaskManager.php
@@ -3,6 +3,7 @@
 namespace Drupal\search_api\Task;
 
 use Drupal\Core\DependencyInjection\DependencySerializationTrait;
+use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Core\StringTranslation\TranslationInterface;
@@ -114,12 +115,21 @@ public function getTasksCount(array $conditions = array()) {
    * {@inheritdoc}
    */
   public function addTask($type, ServerInterface $server = NULL, IndexInterface $index = NULL, $data = NULL) {
-    $task = $this->getTaskStorage()->create(array(
+    if (isset($data)) {
+      if ($data instanceof EntityInterface) {
+        $data = [
+          '#entity_type' => $data->getEntityType(),
+          '#values' => $data->toArray(),
+        ];
+      }
+      $data = serialize($data);
+    }
+    $task = $this->getTaskStorage()->create([
       'type' => $type,
       'server_id' => $server ? $server->id() : NULL,
       'index_id' => $index ? $index->id() : NULL,
-      'data' => isset($data) ? serialize($data) : NULL,
-    ));
+      'data' => $data,
+    ]);
     $task->save();
     return $task;
   }
