X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fsearch.rebuild_db.php;h=81fa957468338bbb099fc5919d0ec40d1afc9cd7;hb=8752950c30a84d2971e84677be17052bc412191f;hp=ed73b28656344fe0d055de8714e7709f57e69623;hpb=da398501bc75b994c9046ae13239db815fcd8ad9;p=platal.git diff --git a/bin/search.rebuild_db.php b/bin/search.rebuild_db.php index ed73b28..81fa957 100755 --- a/bin/search.rebuild_db.php +++ b/bin/search.rebuild_db.php @@ -1,7 +1,7 @@ #!/usr/bin/php5 -q debug = 0; // Do not store backtraces -$res = XDB::iterRow('SELECT auth_user_md5.user_id, nom, prenom, nom_usage, profile_nick FROM auth_user_md5 LEFT JOIN auth_user_quick USING(user_id)'); +XDB::execute('DELETE FROM search_name'); +$res = XDB::iterRow('SELECT auth_user_md5.user_id, nom, prenom, nom_usage, profile_nick + FROM auth_user_md5 + LEFT JOIN auth_user_quick USING(user_id)'); $i = 0; $muls = array(1, 1, 1, 0.2); +$pub = array(true, true, true, false); while ($tmp = $res->next()) { $uid = array_shift($tmp); - _user_reindex($uid, $tmp, $muls); + _user_reindex($uid, $tmp, $muls, $pub); printf("\r%u / %u", ++$i, $res->total()); } print "done\n"; +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>