You are here

function synonyms_search_reindex_nodes_by_vocabulary in Synonyms 7

Mark nodes that reference terms from a vocabulary for search re-indexing.

Parameters

$vocabulary object: Fully loaded vocabulary object

2 calls to synonyms_search_reindex_nodes_by_vocabulary()
synonyms_search_behavior_search_disabled in synonyms_search/plugins/behavior/search.inc
Callback for when the behavior is disabled.
synonyms_search_behavior_search_enabled in synonyms_search/plugins/behavior/search.inc
Callback for when the behavior is enabled.

File

synonyms_search/synonyms_search.pages.inc, line 71
Supportive functions for the module.

Code

function synonyms_search_reindex_nodes_by_vocabulary($vocabulary) {
  $tids = db_select('taxonomy_term_data', 't')
    ->fields('t', array(
    'tid',
  ))
    ->condition('vid', $vocabulary->vid)
    ->execute()
    ->fetchCol();
  if (!empty($tids)) {
    synonyms_search_reindex_nodes_by_terms($tids);
  }
}