search_dirty

  1. drupal
    1. 4.7
    2. 5 search.module
    3. 6 search.module
    4. 7 search.module
Versions
4.7 search_dirty($word = null)
5 – 7 search_dirty($word = NULL)

Marks a word as dirty (or retrieves the list of dirty words). This is used during indexing (cron). Words which are dirty have outdated total counts in the search_total table, and need to be recounted.

▾ 2 functions call search_dirty()

search_index in modules/search.module
Update the full-text search index for a particular item.
search_update_totals in modules/search.module
This function is called on shutdown to ensure that search_total is always up to date (even if cron times out or otherwise fails).

Code

modules/search.module, line 278

<?php
function search_dirty($word = null) {
  static $dirty = array();
  if ($word !== null) {
    $dirty[$word] = true;
  }
  else {
    return $dirty;
  }
}
?>