You are here

function search_update_totals in Drupal 8

Same name and namespace in other branches
  1. 4 modules/search.module \search_update_totals()
  2. 5 modules/search/search.module \search_update_totals()
  3. 6 modules/search/search.module \search_update_totals()
  4. 7 modules/search/search.module \search_update_totals()

Updates the {search_total} database table.

This function is called on shutdown to ensure that {search_total} is always up to date (even if cron times out or otherwise fails).

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_update_totals()
SearchDeprecationTest::testUpdateTotals in core/modules/search/tests/src/Kernel/SearchDeprecationTest.php
@expectedDeprecation search_update_totals() 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 196
Enables site-wide keyword searching.

Code

function search_update_totals() {
  @trigger_error("search_update_totals() 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);
}