amateescu / search_api_solr

11 stars 14 forks source link

Use correct field names in documentation #4

Closed BramG closed 10 years ago

BramG commented 10 years ago
function hook_search_api_solr_field_mapping_alter(\Drupal\search_api\Index\IndexInterface $index, array &$fields) {
  if ($index->entity_type == 'node' && isset($fields['body:value'])) {
    $fields['body:value'] = 'text';
  }
}

I think we need to prepend entity now?

amateescu commented 10 years ago

That's right :) I also fixed the rest of the file while I was at it.