function apachesolr_index_key in Apache Solr Search 6.2
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_index_key()
- 5.2 apachesolr.module \apachesolr_index_key()
- 5 apachesolr.module \apachesolr_index_key()
- 6.3 apachesolr.module \apachesolr_index_key()
- 6 apachesolr.module \apachesolr_index_key()
- 7 apachesolr.module \apachesolr_index_key()
Parameters
array: An array containing:
- index_type: integer
- multiple: boolean
- name: fieldname as string
12 calls to apachesolr_index_key()
- apachesolr_cck_integer_indexing_callback in ./
apachesolr.index.inc - apachesolr_cck_nodereference_indexing_callback in ./
apachesolr.index.inc - apachesolr_cck_text_indexing_callback in ./
apachesolr.index.inc - apachesolr_cck_userreference_indexing_callback in ./
apachesolr.index.inc - apachesolr_date_apachesolr_facets in contrib/
apachesolr_date/ apachesolr_date.module - Implementation of hook_apachesolr_facets(). Only handles end date facets. Start date facet definitions are handled later.
File
- ./
apachesolr.module, line 1798 - Integration with the Apache Solr search application.
Code
function apachesolr_index_key($field) {
switch ($field['index_type']) {
case 'text':
$type_prefix = 't';
break;
case 'string':
$type_prefix = 's';
break;
case 'integer':
$type_prefix = 'i';
break;
case 'sint':
$type_prefix = 'si';
break;
case 'double':
$type_prefix = 'p';
// reserve d for date
break;
case 'boolean':
$type_prefix = 'b';
break;
case 'date':
$type_prefix = 'd';
break;
case 'float':
$type_prefix = 'f';
break;
case 'tdate':
$type_prefix = 'td';
break;
case 'tint':
$type_prefix = 'ti';
break;
case 'tlong':
$type_prefix = 'tl';
break;
case 'tfloat':
$type_prefix = 'tf';
break;
case 'tdouble':
$type_prefix = 'tp';
break;
default:
$type_prefix = 's';
}
$sm = $field['multiple'] ? 'm_' : 's_';
return $type_prefix . $sm . $field['name'];
}