diff --git a/apachesolr.api.php b/apachesolr.api.php
index f873310..7ef3ec3 100644
--- a/apachesolr.api.php
+++ b/apachesolr.api.php
@@ -48,35 +48,39 @@ function HOOK_apachesolr_query_alter($query) {
 /**
  * Alter hook for apachesolr_field_mappings().
  *
-     Add or alter index mappings for Field API types.  The default mappings array handles just
-    list fields and taxonomy term reference fields, such as:
-
-    $mappings['list_text'] = array(
-      'display_callback' => 'apachesolr_fields_list_display_callback',
-      'indexing_callback' => 'apachesolr_fields_list_indexing_callback',
-      'index_type' => 'string',
-      'facets' => TRUE,
-    ),
-
-    In your _alter hook implementation you can add additional field types such as:
-
-      $mappings['number_integer']['number'] = array('indexing_callback' => '', 'index_type' => 'integer', 'facets' => TRUE);
-
-    You can allso add a mapping for a specific field.  This will take precedence over any
-    mapping for a general field type. A field-specific mapping would look like:
-
-      $mappings['per-field']['field_model_name'] = array('indexing_callback' => '', 'index_type' => 'string', 'facets' => TRUE);
-
-    or
-
-      $mappings['per-field']['field_model_price'] = array('indexing_callback' => '', 'index_type' => 'float', 'facets' => TRUE);
-
-    If a custom field needs to be searchable but does not need to be faceted you can change the 'facets'
-    parameter to FALSE, like:
-
-      $mappings['number_integer']['number'] = array('callback' => '', 'index_type' => 'integer', 'facets' => FALSE);
+ * Add or alter index mappings for Field API types.  The default mappings array handles just
+ * list fields and taxonomy term reference fields, such as:
+ *
+ * $mappings['list_text'] = array(
+ *   'display_callback' => 'apachesolr_fields_list_display_callback',
+ *   'indexing_callback' => 'apachesolr_fields_list_indexing_callback',
+ *   'index_type' => 'string',
+ *   'facets' => TRUE,
+ * ),
+ *
+ * In your _alter hook implementation you can add additional field types such as:
+ *
+ *   $mappings['number_integer']['number'] = array('indexing_callback' => '', 'index_type' => 'integer', 'facets' => TRUE);
+ *
+ * You can allso add a mapping for a specific field.  This will take precedence over any
+ * mapping for a general field type. A field-specific mapping would look like:
+ *
+ *   $mappings['per-field']['field_model_name'] = array('indexing_callback' => '', 'index_type' => 'string', 'facets' => TRUE);
+ *
+ * or
+ *
+ *   $mappings['per-field']['field_model_price'] = array('indexing_callback' => '', 'index_type' => 'float', 'facets' => TRUE);
+ *
+ * If a custom field needs to be searchable but does not need to be faceted you can change the 'facets'
+ * parameter to FALSE, like:
+ *
+ *  $mappings['number_integer']['number'] = array('callback' => '', 'index_type' => 'integer', 'facets' => FALSE);
+ * @param $mappings
+ *  An array handling callbacks and index_types for the specific fields
+ * @param $entity_type
+ *  Defines entity_type to enable per entity type per field mapping
  */
-function HOOK_apachesolr_field_mappings_alter(&$mappings) {
+function HOOK_apachesolr_field_mappings_alter(&$mappings, $entity_type) {
 
 }
 
diff --git a/apachesolr.module b/apachesolr.module
index e0abd8f..d5cf20a 100644
--- a/apachesolr.module
+++ b/apachesolr.module
@@ -1598,7 +1599,7 @@ function apachesolr_entity_fields($entity_type = 'node') {
     }
 
     // Allow other modules to add or alter mappings.
-    drupal_alter('apachesolr_field_mappings', $mappings);
+    drupal_alter('apachesolr_field_mappings', $mappings, $entity_type);
     $modules = system_get_info('module');
     $instances = field_info_instances($entity_type);
     foreach (field_info_fields() as $field_name => $field) {
diff --git a/apachesolr_search.module b/apachesolr_search.module
index 0466753..f26248e 100644
--- a/apachesolr_search.module
+++ b/apachesolr_search.module
@@ -144,7 +144,7 @@ function apachesolr_search_page_load($page_id) {
   if ($page) {
     $page->settings = unserialize($page->settings);
   }
-  return $page; 
+  return $page;
 }
 
 /**
@@ -656,7 +656,7 @@ function apachesolr_search_node_result($doc, &$result, &$extra) {
 }
 
 /**
- * Returns whether a search page exists. 
+ * Returns whether a search page exists.
  */
 function apachesolr_search_page_exists($search_page_id) {
   return db_query('SELECT 1 FROM {apachesolr_search_page} WHERE page_id = :page_id', array(':page_id' => $search_page_id))->fetchField();
