function performFullFTSIndex() { require_once 'include/SugarSearchEngine/SugarSearchEngineFullIndexer.php'; $indexer = new SugarSearchEngineFullIndexer(); $indexer->initiateFTSIndexer(); $GLOBALS['log']->info("FTS Indexer initiated."); return true; }
set_time_limit(301); echo "<br>"; echo "<b>{$mod_strings['LBL_PERFORM_DEMO_DATA']}</b>"; echo "<br><br>"; print $render_table_close; print $render_table_open; global $current_user; $current_user = new User(); $current_user->retrieve(1); include "install/populateSeedData.php"; installerHook('post_installDemoData'); } if ((!empty($_SESSION['fts_type']) || !empty($_SESSION['setup_fts_type'])) && empty($_SESSION['setup_fts_skip'])) { installLog('running full indexer'); require_once 'include/SugarSearchEngine/SugarSearchEngineFullIndexer.php'; $indexer = new SugarSearchEngineFullIndexer(); $results = $indexer->performFullSystemIndex(array(), true, true); } $endTime = microtime(true); $deltaTime = $endTime - $startTime; ////////////////////////////////////////// /// PERFORM OFFLINE CLIENT INSTALL ///////////////////////////////////////// if (isset($_SESSION['oc_install']) && $_SESSION['oc_install'] == true) { installLog("Performing Offline Client"); set_time_limit(3600); ini_set('default_socket_timeout', 360); echo '<b>Installing Offline Client</b>'; require_once "include/utils/disc_client_utils.php"; $oc_result = convert_disc_client(); installLog($oc_result);
sugar_die("silentFTSIndex.php is CLI only.\n"); } if (empty($current_language)) { $current_language = $sugar_config['default_language']; } $app_list_strings = return_app_list_strings_language($current_language); $app_strings = return_application_language($current_language); global $current_user; $current_user = BeanFactory::getBean('Users'); $current_user->getSystemUser(); // Pop off the filename array_shift($argv); // Don't wipe the index if we're just doing individual modules $clearData = empty($argv); // Allows for php -f silentFTSIndex.php Bugs Cases $modules = $argv; require_once 'include/SugarSearchEngine/SugarSearchEngineFullIndexer.php'; require_once 'include/SugarSearchEngine/SugarSearchEngineAbstractBase.php'; try { SugarSearchEngineAbstractBase::markSearchEngineStatus(false); // set search engine to "up" $indexer = new SugarSearchEngineFullIndexer(); if (!$indexer->performFullSystemIndex($modules, $clearData)) { echo "FTS index failed. Please check the sugarcrm.log for more details.\n"; exit(1); } } catch (Exception $e) { echo "Exception: " . $e->getMessage() . "\n"; exit(1); } exit(0);