function apachesolr_content_fieldapi in Apache Solr Search 6
Same name and namespace in other branches
- 6.2 apachesolr.module \apachesolr_content_fieldapi()
Implementation of hook_content_fieldapi().
File
- ./
apachesolr.module, line 648 - Integration with the Apache Solr search application.
Code
function apachesolr_content_fieldapi($op, $field) {
switch ($op) {
case 'delete instance':
apachesolr_mark_node_type($field['type_name']);
break;
case 'update instance':
// Get the previous value from the table.
$previous = content_field_instance_read(array(
'field_name' => $field['field_name'],
'type_name' => $field['type_name'],
));
$prev_field = array_pop($previous);
if ($field['display_settings'][NODE_BUILD_SEARCH_INDEX]['exclude'] != $prev_field['display_settings'][NODE_BUILD_SEARCH_INDEX]['exclude']) {
apachesolr_mark_node_type($field['type_name']);
}
elseif ($field['multiple'] != $prev_field['multiple']) {
apachesolr_mark_node_type($field['type_name']);
}
break;
}
}