X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fsearch.rebuild_db.php;h=3835a9db890636cfbcc782d7b379a563c8d9fb18;hb=69e3c9f320a0a4a001c4000e173d4afef78a8eed;hp=0509c92384f9bbdfbbac382326b620c09cbbab7a;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/bin/search.rebuild_db.php b/bin/search.rebuild_db.php index 0509c92..3835a9d 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()); }