From 10309ed10b29ed691e59c86d48fbf08e865156af Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 11 Jul 2013 16:26:18 +0200 Subject: [PATCH] Added reset method --- .../lib/system/search/SearchIndexManager.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php index a3b63e748f..358ba5005a 100644 --- a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php @@ -110,4 +110,16 @@ class SearchIndexManager extends SingletonFactory { } WCF::getDB()->commitTransaction(); } + + /** + * Resets the search index. + * + * @param string $objectType + */ + public function reset($objectType) { + $sql = "DELETE FROM wcf".WCF_N."_search_index + WHERE objectTypeID = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array($this->getObjectTypeID($objectType))); + } } -- 2.20.1