function apachesolr_cck_integer_indexing_callback in Apache Solr Search 6.2
1 string reference to 'apachesolr_cck_integer_indexing_callback'
- apachesolr_cck_fields in ./
apachesolr.module - Invokes hook_apachesolr_cck_field_mappings to find out how to handle CCK fields.
File
- ./
apachesolr.index.inc, line 180 - Functions used when indexing content to Apache Solr.
Code
function apachesolr_cck_integer_indexing_callback($node, $field_name, $cck_info) {
$fields = array();
if (isset($node->{$field_name})) {
$index_key = apachesolr_index_key($cck_info);
foreach ($node->{$field_name} as $field) {
if ($index_value = isset($field['value']) ? (int) $field['value'] : FALSE) {
$fields[] = array(
'key' => $index_key,
'value' => $index_value,
);
}
}
}
return $fields;
}