Is there a trick to getting the update_index hook to work? I created a custom module hook but it's not getting called and I can't figure out why...
function mysearch_apachesolr_update_index(&$document, $node) { if (! $document) { return; }
switch ($node->type) { case 'author': $document->addField('sm_field_author_first_name', 'xxx'); $document->addField('sm_field_author_last_name', 'yyy'); break;
case 'book': $document->setMultiValue('sm_field_book_id', 'zzz'); break; } }
Any ideas? Thanks!
Steve
More information about text formats
Helpful... but...
Is there a trick to getting the update_index hook to work? I created a custom module hook but it's not getting called and I can't figure out why...
function mysearch_apachesolr_update_index(&$document, $node) {
if (! $document) {
return;
}
switch ($node->type) {
case 'author':
$document->addField('sm_field_author_first_name', 'xxx');
$document->addField('sm_field_author_last_name', 'yyy');
break;
case 'book':
$document->setMultiValue('sm_field_book_id', 'zzz');
break;
}
}
Any ideas? Thanks!
Steve