Snippet to quickly (re)index search results for a specific node type
30 Apr 2012
Posted by acrollet
Had the need to do this, saving the snippet here.
<?php
$query= db_select('node', 'n')
->fields('n', array('nid'))
->condition('type', 'content_type_machine_name', '=')
->execute();
while ($record = $query->fetchObject()) {
_node_index_node($record);
}
Add new comment