Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.x
Description: 

This change notice is now obsolete, since the search_reindex() function has been refactored and removed. See https://www.drupal.org/node/2326575 for details.



In Drupal 7.x, function search_reindex() had signature:

// 7.x
search_reindex($sid = NULL, $module = NULL, $reindex = FALSE)

In Drupal 8.x, to deal with multilingual content, a new parameter $langcode was introduced. Also, when the Search hooks were converted to use a plugin system, the mostly-broken code that kept track of backlinks during search indexing of nodes was removed, and with it, all of the code that used the $reindex parameter, making that parameter useless.

So, the $reindex parameter has been removed in 8.x, and the new function signature is:

// 8.x
search_reindex($type = NULL, $sid = NULL, $langcode = NULL)

Note that the $type parameter in Drupal 8.x plays the same role as the $module parameter in Drupal 7.x -- it corresponds to the corresponding parameter in search_index():

// 7.x
search_index($sid, $module, $text)
// 8.x
search_index($type, $sid, $langcode, $text)

(In both cases, the $module/$type parameter to these functions corresponds to a value in the 'type' column of the {search_index} database table.)

If you had code that previously passed in the optional $reindex parameter, you'll need to remove that from your call, and you'll probably also want to consider whether you want to supply a language code in your call to search_reindex(). Check the API documentation for search_reindex() in Drupal 8.x for more information about the function parameters.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done