Fix missing search index after switching from Elasticsearch to MySQL
authorMarcel Werk <burntime@woltlab.com>
Wed, 10 Jan 2024 17:05:31 +0000 (18:05 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 10 Jan 2024 17:05:31 +0000 (18:05 +0100)
Closes #4521

wcfsetup/install/files/lib/system/search/mysql/MysqlSearchIndexManager.class.php

index 1d2608734af3b2de5e212c0783f89c7599585998..1e71748d9a24fd795ec5198f5e4ced1ece0d15b8 100644 (file)
@@ -127,6 +127,8 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
      */
     public function reset($objectType)
     {
+        $this->createSearchIndex(SearchIndexManager::getInstance()->getObjectType($objectType));
+
         $sql = "TRUNCATE TABLE " . SearchIndexManager::getTableName($objectType);
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute();