function node_update_index
7.x node.module | node_update_index() |
6.x node.module | node_update_index() |
Implements hook_update_index().
4 calls to node_update_index()
- SearchAdvancedSearchForm::setUp in drupal-7.x/
modules/ search/ search.test - Sets up a Drupal site for running functional and integration tests.
- SearchCommentCountToggleTestCase::setUp in drupal-7.x/
modules/ search/ search.test - Sets up a Drupal site for running functional and integration tests.
- SearchConfigSettingsForm::setUp in drupal-7.x/
modules/ search/ search.test - Sets up a Drupal site for running functional and integration tests.
- SearchEmbedForm::setUp in drupal-7.x/
modules/ search/ search.test - Sets up a Drupal site for running functional and integration tests.
4 string references to 'node_update_index'
- hook_search_execute in drupal-7.x/
modules/ search/ search.api.php - Execute a search for a set of key words.
- hook_update_index in drupal-7.x/
modules/ search/ search.api.php - Update the search index for this module.
- node_search_execute in drupal-7.x/
modules/ node/ node.module - Implements hook_search_execute().
- _node_index_node in drupal-7.x/
modules/ node/ node.module - Indexes a single node.
File
- drupal-7.x/
modules/ node/ node.module, line 2761 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_update_index() {
$limit = (int) variable_get('search_cron_limit', 100);
$result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit, array(), array('target' => 'slave'));
foreach ($result as $node) {
_node_index_node($node);
}
}