From: <ny...@us...> - 2007-05-04 09:26:16
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv14326 Modified Files: tiki-admin_include_search.php tiki-setup.php Log Message: [NEW] search indexation: add a new indexation mode "normal" (the old one is named "random"). Note : This concerns only search indexation that doesn't use MySQL fulltext indexation. * The "random" mode indexes tiki objects the following way : - each time a page (every php script that includes tiki-setup.php) is generated and sent to the browser, a random indexation is started, - this random indexation will do something only sometimes (more precisely, the function doesn't do anything if the result of a call to the php rand function returns 1 with a 1 to $search_refresh_rate range, defined in the search admin panel), - when it does it's job, it randomly choose one tiki object (i.e. one wiki page, file, forum comment, ...) and index it. * The new "normal" generates it's indexes this way : - each time a tiki object content is created or modified, it is reindexed. So, the "normal" mode is what is usually done everywhere, because it garanties that a new or modified content is immediately indexed. With the "random", you can, for example, upload files quicker, but you are never sure that all your content is indexed. Since the "normal" mode seems to be what everyone usually expects, I choosed to set it up as the default mode (feel free to change this if you don't agree). Index: tiki-admin_include_search.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-admin_include_search.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- tiki-admin_include_search.php 6 Mar 2007 19:29:45 -0000 1.18 +++ tiki-admin_include_search.php 4 May 2007 09:25:46 -0000 1.19 @@ -26,6 +26,7 @@ simple_set_int("search_syll_age"); simple_set_int("search_lru_purge_rate"); simple_set_int("search_lru_length"); + simple_set_value("search_refresh_index_mode"); } global $tiki_p_admin; Index: tiki-setup.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-setup.php,v retrieving revision 1.426 retrieving revision 1.427 diff -u -d -r1.426 -r1.427 --- tiki-setup.php 26 Apr 2007 13:34:02 -0000 1.426 +++ tiki-setup.php 4 May 2007 09:25:46 -0000 1.427 @@ -741,6 +741,7 @@ $pref['feature_search_fulltext'] = 'y'; $pref['feature_search_show_forbidden_obj'] = 'n'; $pref['feature_search_show_forbidden_cat'] = 'n'; +$pref['search_refresh_index_mode'] = 'normal'; # chat $sections['chat']['feature'] = 'feature_chat'; @@ -1757,7 +1758,7 @@ */ # Don't waste time refreshing if we're using full text search. -if ($feature_search == 'y' && $feature_search_fulltext != 'y' ) { +if ($feature_search == 'y' && $feature_search_fulltext != 'y' && $search_refresh_index_mode == 'random' ) { include_once('lib/search/refresh.php'); register_shutdown_function('refresh_search_index'); } |