diff --git a/search_api_db/src/Plugin/search_api/backend/Database.php b/search_api_db/src/Plugin/search_api/backend/Database.php
index 6c26bbd..a43ecb1 100644
--- a/search_api_db/src/Plugin/search_api/backend/Database.php
+++ b/search_api_db/src/Plugin/search_api/backend/Database.php
@@ -1114,6 +1114,10 @@ class Database extends BackendPluginBase {
         $ret = array();
         foreach (preg_split('/[^\p{L}\p{N}]+/u', $value, -1, PREG_SPLIT_NO_EMPTY) as $v) {
           if ($v) {
+            if (strlen($v) > 50) {
+              $this->getLogger()->warning('An overlong word (more than 50 characters) was encountered while indexing: %word.<br />Database search servers currently cannot index such words correctly – the word was therefore trimmed to the allowed length. Ensure you are using a tokenizer preprocessor.', array('%word' => $v));
+              $v = mb_strcut($v, 0, 50);
+            }
             $ret[] = array(
               'value' => $v,
               'score' => 1,
diff --git a/search_api_db/src/Tests/BackendTest.php b/search_api_db/src/Tests/BackendTest.php
index e61d766..7727d1f 100644
--- a/search_api_db/src/Tests/BackendTest.php
+++ b/search_api_db/src/Tests/BackendTest.php
@@ -92,6 +92,9 @@ class BackendTest extends EntityUnitTestBase {
 
     $this->searchNoResults();
     $this->regressionTests2();
+
+    $this->regressionTests3();
+
     $this->checkModuleUninstall();
   }
 
@@ -691,6 +694,7 @@ class BackendTest extends EntityUnitTestBase {
     $this->assertEqual($facets, $expected, 'Correct facets were returned');
   }
 
+
   /**
    * Compares two facet filters to determine their order.
    *
@@ -722,6 +726,26 @@ class BackendTest extends EntityUnitTestBase {
     Index::load($this->indexId)->clear();
   }
 
+  function regressionTests3() {
+    $index = Index::load($this->indexId);
+    $index->getFields(FALSE)[$this->getFieldId('body')]->setIndexed(TRUE, TRUE);
+    $index->save();
+    $this->indexItems($this->indexId);
+
+    // Regression test for #2471509.
+    $a = entity_create('entity_test', array(
+      'id' => 8,
+      'name' => 'Article with long body',
+      'type' => 'article',
+      'body' => 'astringlongerthanfiftycharactersthatcantbestoredbythedbbackend',
+    ))->save();
+    $count = $this->indexItems($this->indexId);
+    $this->assertEqual($count, 1, 'Indexing an item with a word longer than 50 characters.');
+
+    $index->getFields(FALSE)[$this->getFieldId('body')]->setIndexed(FALSE, TRUE);
+    $index->save();
+  }
+
   /**
    * Executes regression tests which are unpractical to run in between.
    */
