public function purgeSearchTables()
	{
		$objDatabase = Database::getInstance();

		// Truncate the tables
		$objDatabase->execute("TRUNCATE TABLE tl_search");
		$objDatabase->execute("TRUNCATE TABLE tl_search_index");

		$strCachePath = StringUtil::stripRootDir(System::getContainer()->getParameter('kernel.cache_dir'));

		// Purge the cache folder
		$objFolder = new Folder($strCachePath . '/contao/search');
		$objFolder->purge();

		// Add a log entry
		$this->log('Purged the search tables', __METHOD__, TL_CRON);
	}
public function purgeSearchTables()
	{
		$objDatabase = Database::getInstance();

		
		$objDatabase->execute("TRUNCATE TABLE tl_search");
		$objDatabase->execute("TRUNCATE TABLE tl_search_index");

		$strCachePath = StringUtil::stripRootDir(System::getContainer()->getParameter('kernel.cache_dir'));

		
		$objFolder = new Folder($strCachePath . '/contao/search');
		$objFolder->purge();

		
		$this->log('Purged the search tables', __METHOD__, TL_CRON);
	}
public function purgeSearchTables ( ) { $ objDatabase = Database :: getInstance ( ) ; // Truncate the tables $ objDatabase -> execute ( "TRUNCATE TABLE tl_search" ) ; $ objDatabase -> execute ( "TRUNCATE TABLE tl_search_index" ) ; $ strCachePath = StringUtil :: stripRootDir ( System :: getContainer ( ) -> getParameter ( 'kernel.cache_dir' ) ) ; // Purge the cache folder $ objFolder = new Folder ( $ strCachePath . '/contao/search' ) ; $ objFolder -> purge ( ) ; // Add a log entry $ this -> log ( 'Purged the search tables' , __METHOD__ , TL_CRON ) ; }
Purge the search tables
Purge the search tables