View Single Post
Old 11-06-2005, 01:52 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
I don't know of such a script, but you could try the following untested code with PhpDig version 1.8.8 RC1 so that word weight is bumped on each reindex according to what is in the logs table.

In robot_functions.php find:
Code:
          //New index record
          if ($it == 0) {
             $sqlvalues .= "($spider_id,$key_id,$value)";
             $it = 1;
          }
          else {
             $sqlvalues .= ",\n($spider_id,$key_id,$value)";
          }
And replace with the following:
Code:
          //New index record
          if ($it == 0) {
             $sqlvalues .= "($spider_id,$key_id,$value)";
             $it = 1;
          }
          else {
             $weight_select = "SELECT COUNT(*) FROM ".PHPDIG_DB_PREFIX."logs WHERE l_includes = '".$key."'";
             $weight_query = mysql_query($weight_select,$id_connect);
             $weight_bump = mysql_fetch_row($weight_query);
             $weightbump = intval($weight_bump[0]);
             $value += $weightbump;
             $sqlvalues .= ",\n($spider_id,$key_id,$value)";
          }
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote