Apachesolr is installed as a mutli installation on the Drupal 6 platform.
The folllowing functions works
function tb_misc_apachesolr_modify_query(&$query, &$params, $caller) {
$query->add_filter('hash', apachesolr_site_hash());
}
function tb_misc_apachesolr_delete_index_alter(&$query) {
//$query = 'hash:' . apachesolr_site_hash();
}
However I need to add 2 custom fields to include into the search results. I tried the following.
// filters search results by site
function tb_misc_apachesolr_modify_query(&$query, &$params, $caller) {
$query->add_filter('hash', apachesolr_site_hash());
$params['fl'] .= ',sm_field_author_first_name,sm_field_images,sm_field_author_last_name';
}
function tb_misc_apachesolr_update_index(&$document, $node) {
if ($node->type == 'author') {
$document->addField('sm_field_author_first_name', $node->field_author_first_name);
$document->addField('sm_field_author_last_name', $node->field_author_last_name);
}
}
function tb_misc_apachesolr_delete_index_alter(&$query) {
//$query = 'hash:' . apachesolr_site_hash();
}
I deleted the search index and manually run cron. At this point Apachesolr was throwing out errors.
Any help will be grately appreciated.
Sammyb 
Recent comments
31 min 56 sec ago
1 day 19 hours ago
2 days 22 hours ago
3 weeks 1 day ago
3 weeks 5 days ago
3 weeks 5 days ago
3 weeks 5 days ago
3 weeks 6 days ago
3 weeks 6 days ago
4 weeks 16 hours ago