In Drupal 7, a particular module's implementation of hook_update_index() only actually runs if search.module is enabled, and also if on the Search configuration page, your module has been enabled as an active Search module.
See http://api.drupal.org/api/function/search_cron/7 :
foreach(variable_get('search_active_modules', array('node', 'user')) as $module) {
// Update word index
module_invoke($module, 'update_index');
}
This needs to be documented on http://api.drupal.org/api/function/hook_update_index/7 -- Currently it just says hook_update_index runs in every cron run. This should probably also be documented on the module update guide, as it is a change from Drupal 6 behavior (and I have one data point, myself, of a module developer being caught by it).
Comment | File | Size | Author |
---|---|---|---|
#1 | 704866.patch | 9.22 KB | jhodgdon |
Comments
Comment #1
jhodgdonUgh. There were all sorts of other issues with the Search API doc in search.api.php, so here's a big patch to fix it up.
Comment #2
jhodgdonThe above patch also fixes #699532: hook_search_execute() doc mentions do_search(), which I've marked as a duplicate of this issue.
Comment #3
mvcpatch looks great to me. thanks, jhodgdon!
added to the handbook's page on converting modules: http://drupal.org/update/modules/6/7#hook_update_index
#d7csmtl
Comment #4
mvcproperly tagging for posterity...
Comment #5
mvctrying that again...
Comment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.