diff --git a/modules/search_api_db/search_api_db.install b/modules/search_api_db/search_api_db.install
new file mode 100644
index 00000000..e6e4a63a
--- /dev/null
+++ b/modules/search_api_db/search_api_db.install
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the Database Search module.
+ */
+
+use Drupal\Core\Database\Database;
+
+/**
+ * Reduces the length of sort-value columns for fulltext fields to 30.
+ */
+function search_api_db_update_8101() {
+  // @see https://www.drupal.org/node/2862289
+  $key_value = \Drupal::keyValue('search_api_db.indexes');
+
+  foreach ($key_value->getAll() as $db_info) {
+    // Use the correct database from the server's backend configuration.
+    $database = \Drupal::config('search_api.server.' . $db_info['server'])
+      ->get('backend_config.database');
+    if (!$database) {
+      continue;
+    }
+    list($key, $target) = explode(':', $database, 2);
+    $schema = Database::getConnection($target, $key)->schema();
+
+    $table = $db_info['index_table'];
+    foreach ($db_info['field_tables'] as $field_info) {
+      $column = $field_info['column'];
+      if ($field_info['type'] === 'text'
+          && $schema->fieldExists($table, $column)) {
+        $spec = [
+          'type' => 'varchar',
+          'length' => 30,
+          'description' => "The field's value for this item",
+        ];
+        $schema->changeField($table, $column, $column, $spec);
+      }
+    }
+  }
+
+  return t('Fulltext field database columns updated.');
+}
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 0b337db7..8245ad5d 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
@@ -818,6 +818,7 @@ protected function createFieldTable(FieldInterface $field = NULL, $db, $type = '
   protected function sqlType($type) {
     switch ($type) {
       case 'text':
+        return array('type' => 'varchar', 'length' => 30);
       case 'string':
       case 'uri':
         return array('type' => 'varchar', 'length' => 255);
