function search_dirty

Same name in other branches
  1. 7.x 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.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use custom implementation of \Drupal\search\SearchIndexInterface instead.

See also

https://www.drupal.org/node/3075696

1 call to search_dirty()
SearchDeprecationTest::testDirty in core/modules/search/tests/src/Kernel/SearchDeprecationTest.php
@expectedDeprecation search_dirty() is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use custom implementation of \Drupal\search\SearchIndexInterface instead. See https://www.drupal.org/node/3075696

File

core/modules/search/search.module, line 163

Code

function search_dirty($word = NULL) {
    @trigger_error("search_dirty() is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use custom implementation of \\Drupal\\search\\SearchIndexInterface instead. See https://www.drupal.org/node/3075696", E_USER_DEPRECATED);
    // Keep return result type for backward compatibility.
    if ($word === NULL) {
        return [];
    }
}

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