You are here

function apachesolr_user_profile_index_key in Apachesolr User 6

1 call to apachesolr_user_profile_index_key()
apachesolr_user_user_to_document in ./apachesolr_user.module
Given a node ID, return a document representing that node.

File

./apachesolr_user.module, line 244

Code

function apachesolr_user_profile_index_key($field) {
  switch ($field['type']) {
    case 'textfield':
    case 'textarea':
      $type_prefix = 't';
      break;
    case 'checkbox':
      $type_prefix = 'b';
      break;
    case 'date':
      $type_prefix = 'd';
      break;
    default:
      $type_prefix = 's';
  }
  $sm = $field['multiple'] ? 'm_' : 's_';
  return $type_prefix . $sm . $field['name'];
}