function apachesolr_index_key in Apache Solr Search 5
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_index_key()
- 5.2 apachesolr.module \apachesolr_index_key()
- 6.3 apachesolr.module \apachesolr_index_key()
- 6 apachesolr.module \apachesolr_index_key()
- 6.2 apachesolr.module \apachesolr_index_key()
- 7 apachesolr.module \apachesolr_index_key()
array('index_type' => 'integer', 'multiple' => TRUE, 'name' => 'fieldname', ),
4 calls to apachesolr_index_key()
- ApacheSolrUpdate::update_index in ./
apachesolr.module - apachesolr_multisitesearch_search in contrib/
apachesolr_multisitesearch/ apachesolr_multisitesearch.module - Implementation of hook_search().
- apachesolr_search_block in ./
apachesolr_search.module - Implementation of hook_block().
- apachesolr_search_search in ./
apachesolr_search.module - Implementation of hook_search().
File
- ./
apachesolr.module, line 762 - 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 '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;
default:
$type_prefix = 's';
}
$sm = $field['multiple'] ? 'm' : 's';
return $type_prefix . $sm . $field['name'];
}