Index: modules/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search.module,v
retrieving revision 1.126
diff -U3 -r1.126 search.module
--- modules/search.module 24 Apr 2005 16:34:35 -0000  1.126
+++ modules/search.module 13 May 2005 16:55:01 -0000
@@ -215,11 +215,7 @@
     $total = db_result(db_query("SELECT SUM(score) FROM {search_index} WHERE word = '%s'", $word));
     db_query("UPDATE {search_total} SET count = %d WHERE word = '%s'", $total, $word);
     if (!db_affected_rows()) {
-      // Note: affected rows does not count matching rows that already had the right value!
-      $exists = db_result(db_query("SELECT COUNT(*) FROM {search_total} WHERE word = '%s'", $word));
-      if (!$exists) {
-        db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %d)", $word, $total);
-      }
+      db_query("INSERT INTO {search_total} (word, count) VALUES ('%s', %d)", $word, $total);
     }
   }
   // Find words that were deleted from search_index, but are still in