Index: service.inc
===================================================================
--- service.inc	(revision 1670)
+++ service.inc	(working copy)
@@ -234,10 +234,22 @@
       if (!class_exists('Apache_Solr_Service')) {
         throw new Exception(t('SolrPhpClient library not found! Please follow the instructions in search_api_solr/INSTALL.txt for installing the Solr search module.'));
       }
+      $this->preConnect(&$this->options);
       $this->solr = new SearchApiSolrConnection($this->options);
     }
   }
 
+  protected function preConnect(&$options) {
+  }
+
+  protected function getFacetField($field) {
+
+    if ($field[0] == 's') {
+      $field = 'f_' . $field;
+    }
+    return $field;
+  }
+
   public function addIndex(SearchApiIndex $index) {
     if (module_exists('search_api_multi') && module_exists('search_api_views')) {
       views_invalidate_cache();
@@ -749,10 +761,7 @@
       $extract_facets = ($extract_facets ? $extract_facets : array());
 
       foreach ($extract_facets as $delta => $info) {
-        $field = $fields[$info['field']];
-        if ($field[0] == 's') {
-          $field = 'f_' . $field;
-        }
+        $field = $this->getFacetField($fields[$info['field']]);
         if (!empty($facet_fields->$field)) {
           $min_count = $info['min_count'];
           $terms = $facet_fields->$field;
@@ -978,15 +987,12 @@
       if (empty($fields[$info['field']])) {
         continue;
       }
-      $field = $f = $fields[$info['field']];
       // String fields have their own corresponding facet fields.
-      if ($field[0] == 's') {
-        $field = 'f_' . $field;
-      }
+      $field = $this->getFacetField($fields[$info['field']]);
       // Check for the "or" operator.
       if (isset($info['operator']) && $info['operator'] === 'or') {
         // Remember that filters for this field should be tagged.
-        $escaped = SearchApiSolrConnection::escapeFieldName($f);
+        $escaped = SearchApiSolrConnection::escapeFieldName($fields[$info['field']]);
         $taggedFields[$escaped] = "{!tag=$escaped}";
         // Add the facet field.
         $facet_params['facet.field'][] = "{!ex=$escaped}$field";
@@ -1452,10 +1458,7 @@
         $results['search_api_facets'] = array();
         $facet_fields = $response->facet_counts->facet_fields;
         foreach ($facets as $delta => $info) {
-          $field = $solr_fields[$info['field']];
-          if ($field[0] == 's') {
-            $field = 'f_' . $field;
-          }
+          $field = $this->getFacetField($solr_fields[$info['field']]);
           if (!empty($facet_fields->$field)) {
             $min_count = $info['min_count'];
             $terms = $facet_fields->$field;
Index: solr_connection.inc
===================================================================
--- solr_connection.inc	(revision 1670)
+++ solr_connection.inc	(working copy)
@@ -47,13 +47,14 @@
       'path' => '',
       'http_user' => NULL,
       'http_pass' => NULL,
+      'default_field'=>'id',
     );
     parent::__construct($options['host'], $options['port'], $options['path']);
     if ($options['http_user'] && $options['http_pass']) {
       $this->http_auth = 'Basic ' . base64_encode($options['http_user'] . ':' . $options['http_pass']);
     }
     // Since /ping otherwise complains about missing default field.
-    $this->_pingUrl .= '?q=id:1';
+    $this->_pingUrl .= '?q='.$options['default_field'].':1';
 
     // As of July 2011, the newest release is r60, with Service.php having
     // revision 59. Revision 40 is just anything between 22 (old) and that.
