diff --git a/service.inc b/service.inc
index 2f03bee..e9b660c 100644
--- a/service.inc
+++ b/service.inc
@@ -33,6 +33,7 @@ class SearchApiSolrService extends SearchApiAbstractService {
     'duration' => 'i',
     'boolean' => 'b',
     'uri' => 's',
+    'location' => 'loc',
   );

   /**
@@ -191,6 +192,7 @@ class SearchApiSolrService extends SearchApiAbstractService {
       'search_api_mlt',
       'search_api_multi',
       'search_api_spellcheck',
+      'search_api_data_type_location',
     ));
     return isset($supported[$feature]);
   }
@@ -349,6 +351,15 @@ class SearchApiSolrService extends SearchApiAbstractService {
         // Generate a field name; this corresponds with naming conventions in
         // our schema.xml
         $type = $field['type'];
+
+        // Use the real type of the field if the server supports this type.
+        if (isset($field['real_type'])) {
+          $custom_type = search_api_extract_inner_type($field['real_type']);
+          if ($this->supportsFeature('search_api_data_type_' . $custom_type)) {
+            $type = $field['real_type'];
+          }
+        }
+
         $inner_type = search_api_extract_inner_type($type);
         $pref = isset(self::$type_prefixes[$inner_type]) ? self::$type_prefixes[$inner_type] : '';
         if ($pref != 't') {
