diff --git a/core/modules/search/search.install b/core/modules/search/search.install
index 03f0c59..4a1c9a7 100644
--- a/core/modules/search/search.install
+++ b/core/modules/search/search.install
@@ -24,6 +24,7 @@ function search_schema() {
         'length' => '12',
         'not null' => TRUE,
         'description' => 'The {languages}.langcode of the item variant.',
+        'default' => '',
       ),
       'type' => array(
         'type' => 'varchar',
@@ -70,6 +71,7 @@ function search_schema() {
         'length' => '12',
         'not null' => TRUE,
         'description' => 'The {languages}.langcode of the item variant.',
+        'default' => '',
       ),
       'type' => array(
         'type' => 'varchar',
@@ -174,3 +176,37 @@ function search_update_8000() {
    'search_default_module' => 'default_module',
   ));
 }
+
+/**
+ * Adds the langcode field and indexes to {search_dataset} and {search_index}.
+ */
+function search_update_8001() {
+  // Add the fields and indexes.
+  db_drop_primary_key('search_dataset');
+  db_add_field('search_dataset', 'langcode', array(
+    'type' => 'varchar',
+    'length' => '12',
+    'not null' => TRUE,
+    'description' => 'The {languages}.langcode of the item variant.',
+    'default' => '',
+  ));
+  db_add_primary_key('search_dataset', array('sid', 'langcode', 'type'));
+
+  db_drop_primary_key('search_index');
+  db_drop_index('search_index', 'sid_type');
+  db_add_field('search_index', 'langcode', array(
+    'type' => 'varchar',
+    'length' => '12',
+    'not null' => TRUE,
+    'description' => 'The {languages}.langcode of the item variant.',
+    'default' => '',
+  ),
+  array(
+    'indexes' => array(
+      'sid_type' => array('sid', 'langcode', 'type'),
+    ),
+  ));
+  db_add_primary_key('search_index', array('word', 'sid', 'langcode', 'type'));
+
+  // How do we upgrade the existing entries to have the correct langcode?
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php
index 34c8c94..c1b6590 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php
@@ -136,6 +136,9 @@ public function testLanguageUpgrade() {
 
     $translation_string = db_query("SELECT * FROM {locales_target} WHERE lid = 22 AND language = 'ca'")->fetchObject();
     $this->assertEqual($translation_string->translation, implode(LOCALE_PLURAL_DELIMITER, array('1 byte', '@count bytes')));
+
+    // Ensure that re-indexing the search does not fail.
+    search_reindex();
   }
 
   /**
