function apachesolr_og_apachesolr_update_index in Apache Solr Search 5.2
Same name and namespace in other branches
- 6 contrib/apachesolr_og/apachesolr_og.module \apachesolr_og_apachesolr_update_index()
Implementation of hook_apachesolr_update_index().
File
- contrib/
apachesolr_og/ apachesolr_og.module, line 57 - Integrates Organic Group info with Apache Solr search application.
Code
function apachesolr_og_apachesolr_update_index(&$document, $node) {
// Index group posts
if (!empty($node->og_groups)) {
foreach ($node->og_groups as $gid) {
$document
->setMultiValue(_apachesolr_og_gid_key(), $gid);
}
}
elseif (isset($node->og_description) && variable_get('apachesolr_og_groupnode', 0)) {
// Index the group node itself as in the group.
$document
->setMultiValue(_apachesolr_og_gid_key(), $node->nid);
}
}