function search_dirty

Same name in other branches
  1. 8.9.x core/modules/search/search.module \search_dirty()

Marks a word as "dirty" (changed), or retrieves the list of dirty words.

This is used during indexing (cron). Words that are dirty have outdated total counts in the search_total table, and need to be recounted.

2 calls to search_dirty()
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_update_totals in modules/search/search.module
Updates the {search_total} database table.

File

modules/search/search.module, line 339

Code

function search_dirty($word = NULL) {
    $dirty =& drupal_static(__FUNCTION__, array());
    if ($word !== NULL) {
        $dirty[$word] = TRUE;
    }
    else {
        return $dirty;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.