? sync_d5alpha3-to-d6alpha3.patch
Index: apachesolr.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.install,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 apachesolr.install
--- apachesolr.install	29 Jun 2008 13:53:29 -0000	1.1.2.3
+++ apachesolr.install	29 Jul 2008 16:48:20 -0000
@@ -1,6 +1,5 @@
 <?php
 // $Id: apachesolr.install,v 1.1.2.3 2008/06/29 13:53:29 drunkenmonkey Exp $
-
 function apachesolr_uninstall() {
   variable_del('apachesolr_cron_last');
   variable_del('apachesolr_cron_last_nid');
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.18
diff -u -p -r1.1.2.18 apachesolr.module
--- apachesolr.module	19 Jul 2008 14:22:43 -0000	1.1.2.18
+++ apachesolr.module	29 Jul 2008 16:48:20 -0000
@@ -6,6 +6,9 @@
  *   Integration with the Apache Solr search application.
  */
 
+/**
+ * Implementation of hook_menu().
+ */
 function apachesolr_menu($may_cache) {
   $items = array();
   if ($may_cache) {
@@ -49,7 +52,7 @@ function apachesolr_settings() {
     '#description' => t('Path that identifies the Solr request handler to be used. Leave this as /solr for now.'),
     );
   $options = array();
-  foreach (array(5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100) as $option) {
+  foreach (array(5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100) as $option) {
     $options[$option] = $option;
   }
   $form['apachesolr_rows'] = array(
@@ -62,6 +65,9 @@ function apachesolr_settings() {
   return system_settings_form($form);
 }
 
+/**
+ * Implementation of hook_requirements().
+ */
 function apachesolr_requirements($phase) {
   // Ensure translations don't break at install time
   $t = get_t();
@@ -81,7 +87,7 @@ function apachesolr_requirements($phase)
     catch (Exception $e) {
       watchdog('Apache Solr', $e->getMessage(), WATCHDOG_ERROR);
     }
-    $value =  $ping ? $t('Solr can be pinged.'): $t('No Solr instance is available.');
+    $value =  $ping ? $t('Solr can be pinged.') : $t('No Solr instance is available.');
     $severity = $ping ? REQUIREMENT_OK: REQUIREMENT_ERROR;
     $description = theme('item_list', array($t('Host: %host', array('%host' => $host)),
                         $t('Port: %port', array('%port' => $port)),
@@ -99,7 +105,7 @@ function apachesolr_requirements($phase)
 function apachesolr_index_page() {
   //TODO: Should we be generating the dynamic blocks based on what is indexed?
   // Or should we be using things like node_field.type to get this list?
-  $response = drupal_http_request(apachesolr_base_url(). "/admin/luke?numTerms=0");
+  $response = drupal_http_request(apachesolr_base_url() ."/admin/luke?numTerms=0");
   if ($response->code == '200') {
     $xml_response = simplexml_load_string($response->data);
     $fields = $xml_response->xpath("//lst[@name='fields']/lst");
@@ -188,6 +194,7 @@ class ApacheSolrUpdate {
 
     $result = self::getNodesToIndex($namespace);
     $count = 0;
+    $documents = array();
     while ($row = db_fetch_object($result)) {
       // Variables to track the last item changed.
       $solr_last_change = $row->last_change;
@@ -215,7 +222,7 @@ class ApacheSolrUpdate {
           // Let modules add to the document
           module_invoke_all('apachesolr_update_index', &$document, $node);
 
-          $fields = array('title', 'body', 'type', 'uid', 'changed', 'nid', 'comment_count', 'name');
+          $fields = array('title', 'body', 'type', 'uid', 'changed', 'nid', 'comment_count', 'name', 'language');
           foreach ((array)$node as $key => $value) {
             if (in_array($key, $fields)) {
               $document->$key = $value;
@@ -250,11 +257,11 @@ class ApacheSolrUpdate {
           if (is_array($node->taxonomy)) {
             foreach ($node->taxonomy as $term) {
               $document->setMultiValue('tid', $term->tid);
-
+              
               // Double indexing of tids lets us do effecient searches (on tid)
               // and do accurate per-vocabulary faceting.
               $document->setMultiValue('imfield_vid' . $term->vid, $term->tid);
-
+              
               $document->setMultiValue('vid', $term->vid);
               $document->setMultiValue('taxonomy_name', $term->name);
             }
@@ -277,7 +284,7 @@ class ApacheSolrUpdate {
     if (is_object($solr)) {
       // remaining documents
       try {
-        watchdog('Apache Solr', "Adding " . count($documents) ." documents in cleanup");
+        watchdog('Apache Solr', 'Adding @count documents in cleanup', array('@count' => count($documents)));
         $solr->addDocuments($documents);
         $solr->commit();
         $solr->optimize(FALSE, FALSE);
@@ -289,7 +296,9 @@ class ApacheSolrUpdate {
   }
 }
 
-
+/**
+ * Registered shutdown function.
+ */
 function apachesolr_shutdown() {
   foreach (ApacheSolrUpdate::$_namespaces as $namespace => $vars) {
     extract($vars);
@@ -300,6 +309,9 @@ function apachesolr_shutdown() {
   }
 }
 
+/**
+ * Implementation of hook_nodeapi().
+ */
 function apachesolr_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   switch ($op) {
     case 'delete':
@@ -315,6 +327,9 @@ function apachesolr_nodeapi(&$node, $op,
   }
 }
 
+/**
+ * Implementation of hook_block().
+ */
 function apachesolr_block($op = 'list', $delta = 0, $edit = array()) {
   $term_title = t('ApacheSolr: Filter by term');
   $type_title = t('ApacheSolr: Filter by type');
@@ -335,6 +350,7 @@ function apachesolr_block($op = 'list', 
         foreach ($fields as $name => $field) {
           $index_key = apachesolr_index_key($field);
           $label = db_result(db_query("SELECT label FROM {node_field_instance} WHERE field_name = '%s'", $name));
+          // TODO: $index_key must be wrong here.
           $blocks[$index_key] = array('info' => t('ApacheSolr: Filter by @field', array('@field' => $label)));
         }
       }
@@ -346,61 +362,33 @@ function apachesolr_block($op = 'list', 
     case 'view':
       if (apachesolr_has_searched()) {
         // Get the query and response. Without these no blocks make sense.
-        $query =& apachesolr_drupal_query();
         $response =& apachesolr_static_response_cache();
         if (empty($response)) {
           return;
         }
+        $query =& apachesolr_drupal_query();
         
-        // Sorting block
-        if ($delta == 'sort') {
-          $sorts = array(
-            'title' => array('name' => t('Title'), 'default' => 'asc'),
-            'type' => array('name' => t('Type'), 'default' => 'asc'),
-            'name' => array('name' => t('Author'), 'default' => 'asc'),
-            'changed' => array('name' => t('Date'), 'default' => 'desc'),
-          );
-          
-          $solrsorts = array();
-          foreach(explode(',', check_plain($_GET['solrsort'])) as $solrsort) {
-            $parts = explode(' ', $solrsort);
-            if (!empty($parts[0]) && !empty($parts[1])) {
-              $solrsorts[$parts[0]] = $parts[1];
-            }
-          }
-          
-          $sort_links = array();
-          $path = 'search/'. arg(1). '/'. $query->get_query();
-          foreach ($sorts as $type => $sort) {
-            $new_sort = isset($solrsorts[$type]) ? $solrsorts[$type] == 'asc' ? 'desc' : 'asc' : $sort['default'];
-            $sort_links[] = theme('apachesolr_sort_link', $sort['name'], $path, "solrsort={$type} {$new_sort}", $solrsorts[$type]);
-          }
-                  
-          return array('subject' => t('Sort by') . ':',
-                       'content' => theme('apachesolr_sort_list', $sort_links));
-        }
-
         // Get information needed by the rest of the blocks about limits.
         $facet_display_limits = variable_get('apachesolr_facet_query_limits', array());
-
+        
         if ((strpos($delta, 'imfield_vid') === 0) && module_exists('taxonomy')) {
           if (is_array($response->facets->$delta)) {
             $contains_active = FALSE;
             $terms = array();
             foreach ($response->facets->$delta as $tid => $count) {
-              unset($unclick_link);
+              $unclick_link = '';
               unset($active);
               $term = taxonomy_get_term($tid);
               $new_query = clone $query;
               if ($active = $query->has_field('tid', $tid)) {
                 $contains_active = TRUE;
                 $new_query->remove_field('tid', $term->tid);
-                $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                $path = 'search/' . arg(1) . '/' . $new_query->get_query();
                 $unclick_link = theme('apachesolr_unclick_link', $path);
               }
               else {
                 $new_query->add_field('tid', $term->tid);
-                $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                $path = 'search/' . arg(1) . '/' . $new_query->get_query();
               }
               $countsort = $count == 0 ? '' : 1 / $count;
               // if numdocs == 1 and !active, don't add.
@@ -408,13 +396,14 @@ function apachesolr_block($op = 'list', 
                 // skip
               }
               else {
-                $terms[$term->vid][$active ? $countsort. $term->name : 1 + $countsort. $term->name] = theme('apachesolr_facet_item', $term->name, $count, $path, $active, $unclick_link);
+                $terms[$term->vid][$active ? $countsort . $term->name : 1 + $countsort . $term->name] =
+                    theme('apachesolr_facet_item', $term->name, $count, $path, $active, $unclick_link);
               }
             }
           }
           $vid = substr($delta, 11);
           $vocab = taxonomy_get_vocabulary($vid);
-          if (is_numeric($vid) && is_array($terms) && is_array($terms[$vid])) {
+          if (is_numeric($vid) && is_array($terms) && isset($terms[$vid]) && is_array($terms[$vid])) {
             ksort($terms[$vid]);
             $facet_display_limit = isset($facet_display_limits[$delta]) ? $facet_display_limits[$delta] : 10;
             $terms[$vid] = array_slice($terms[$vid], 0, $facet_display_limit);
@@ -427,23 +416,50 @@ function apachesolr_block($op = 'list', 
         }
 
         switch ($delta) {
+          case 'sort':
+            $sorts = array(
+              'title' => array('name' => t('Title'), 'default' => 'asc'),
+              'type' => array('name' => t('Type'), 'default' => 'asc'),
+              'name' => array('name' => t('Author'), 'default' => 'asc'),
+              'changed' => array('name' => t('Date'), 'default' => 'desc'),
+            );
+
+            $solrsorts = array();
+            $sort_parameter = isset($_GET['solrsort']) ? check_plain($_GET['solrsort']) : FALSE;
+            foreach(explode(',', $sort_parameter) as $solrsort) {
+              $parts = explode(' ', $solrsort);
+              if (!empty($parts[0]) && !empty($parts[1])) {
+                $solrsorts[$parts[0]] = $parts[1];
+              }
+            }
+
+            $sort_links = array();
+            $path = 'search/'. arg(1). '/'. $query->get_query();
+            foreach ($sorts as $type => $sort) {
+              $new_sort = isset($solrsorts[$type]) ? $solrsorts[$type] == 'asc' ? 'desc' : 'asc' : $sort['default'];
+              $sort_links[] = theme('apachesolr_sort_link', $sort['name'], $path, "solrsort={$type} {$new_sort}", isset($solrsorts[$type]) ? $solrsorts[$type] : '');
+            }
+            return array('subject' => t('Sort by') . ':',
+             'content' => theme('apachesolr_sort_list', $sort_links));
+
           case 'type':
             if (is_array($response->facets->type)) {
               $contains_active = FALSE;
+              $types = array();
               foreach ($response->facets->type as $t => $count) {
-                unset($unclick_link);
+                $unclick_link = '';
                 unset($active);
                 $type = node_get_types('name', $t);
                 $new_query = clone $query;
                 if ($active = $query->has_field('type', $t)) {
                   $contains_active = TRUE;
                   $new_query->remove_field('type', $t);
-                  $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                  $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                   $unclick_link = theme('apachesolr_unclick_link', $path);
                 }
                 else {
                   $new_query->add_field('type', $t);
-                  $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                  $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                 }
                 $countsort = $count == 0 ? '' : 1 / $count;
                 // if numdocs == 1 and !active, don't add.
@@ -451,10 +467,10 @@ function apachesolr_block($op = 'list', 
                   // skip
                 }
                 else {
-                  $types[$active ? $countsort. $type : 1 + $countsort. $type] = theme('apachesolr_facet_item', $type, $count, $path, $active, $unclick_link);
+                  $types[$active ? $countsort . $type : 1 + $countsort . $type] = theme('apachesolr_facet_item', $type, $count, $path, $active, $unclick_link);
                 }
               }
-              if (is_array($types)) {
+              if (count($types) > 0) {
                 ksort($types);
                 $facet_display_limit = isset($facet_display_limits[$delta]) ? $facet_display_limits[$delta] : 10;
                 $types = array_slice($types, 0, $facet_display_limit);
@@ -468,7 +484,7 @@ function apachesolr_block($op = 'list', 
               $contains_active = FALSE;
               $users = array();
               foreach ($response->facets->uid as $uid => $count) {
-                unset($unclick_link);
+                $unclick_link = '';
                 unset($active);
                 if ($uid == 0) {
                   $name = variable_get('anonymous', t('Anonymous'));
@@ -476,17 +492,17 @@ function apachesolr_block($op = 'list', 
                 else {
                   $name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $uid));
                 }
-
+                
                 $new_query = clone $query;
                 if ($active = $query->has_field('uid', $uid)) {
                   $contains_active = TRUE;
                   $new_query->remove_field('uid', $uid);
-                  $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                  $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                   $unclick_link = theme('apachesolr_unclick_link', $path);
                 }
                 else {
                   $new_query->add_field('uid', $uid);
-                  $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                  $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                 }
                 $countsort = $count == 0 ? '' : 1 / $count;
                 // if numdocs == 1 and !active, don't add.
@@ -494,12 +510,12 @@ function apachesolr_block($op = 'list', 
                   // skip
                 }
                 else {
-                  $users[$active ? $countsort. name : 1 + $countsort. $name] = theme('apachesolr_facet_item', $name, $count, $path, $active, $unclick_link);
+                  $users[$active ? $countsort . $name : 1 + $countsort . $name] = theme('apachesolr_facet_item', $name, $count, $path, $active, $unclick_link);
                 }
               }
               if (is_array($users)) {
                 ksort($users);
-                $facet_display_limit = isset($facet_display_limits[$delta]) ? $facet_display_limits[$delta] : 10;
+                $facet_display_limit = isset($facet_display_limits[$delta]) ? $facet_display_limits[$delta]: 10;
                 $users = array_slice($users, 0, $facet_display_limit);
                 $output = theme('apachesolr_facet_list', $users);
                 return array('subject' => $author_title, 'content' => $output);
@@ -515,18 +531,18 @@ function apachesolr_block($op = 'list', 
                 if (is_array($response->facets->$index_key)) {
                   $contains_active = FALSE;
                   foreach ($response->facets->$index_key as $facet => $count) {
-                    unset($unclick_link);
+                    $unclick_link = '';
                     unset($active);
                     $new_query = clone $query;
                     if ($active = $query->has_field($index_key, $facet)) {
                       $contains_active = TRUE;
                       $new_query->remove_field($index_key, $facet);
-                      $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                      $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                       $unclick_link = theme('apachesolr_unclick_link', $path);
                     }
                     else {
                       $new_query->add_field($index_key, $facet);
-                      $path = 'search/'. arg(1). '/'. $new_query->get_query();
+                      $path = 'search/'. arg(1) .'/'. $new_query->get_query();
                     }
                     $countsort = $count == 0 ? '' : 1 / $count;
                     // if numdocs == 1 and !active, don't add.
@@ -534,7 +550,7 @@ function apachesolr_block($op = 'list', 
                       // skip
                     }
                     else {
-                      $facets[$active ? $countsort. $facet : 1 + $countsort. $facet] = theme('apachesolr_facet_item', $facet, $count, $path, $active, $unclick_link);
+                      $facets[$active ? $countsort . $facet : 1 + $countsort . $facet] = theme('apachesolr_facet_item', $facet, $count, $path, $active, $unclick_link);
                     }
                   }
                   if (is_array($facets)) {
@@ -554,7 +570,7 @@ function apachesolr_block($op = 'list', 
         break;
       }
       break;
-
+      
     case 'configure':
       if ($delta != 'sort') {
         $facet_query_limits = variable_get('apachesolr_facet_query_limits', array());
@@ -571,16 +587,11 @@ function apachesolr_block($op = 'list', 
         return $form;
       }
       break;
-
+      
     case 'save':
       if ($delta != 'sort') {
         // Save query limits
         $query_limit = intval($edit['apachesolr_facet_query_limit']);
-        // Poorman's validation
-        if (($query_limit < 1) && $query_limit !== -1) {
-          form_set_error('apachesolr_facet_query_limit', t('The facet limit was not saved. Try editing this block again'));
-          return;
-        }
         $facet_query_limits = variable_get('apachesolr_facet_query_limits', array());
         $facet_query_limits[$delta] = $query_limit;
         variable_set('apachesolr_facet_query_limits', $facet_query_limits);
@@ -589,18 +600,32 @@ function apachesolr_block($op = 'list', 
   }
 }
 
+/*
+ * Validates a facet query limit input. Must be a positive integer or -1.
+ */
+function apachesolr_facet_query_limit_validate($form, &$form_state) {
+  $value = intval($form_state['values']['apachesolr_facet_query_limit']);
+  if ($value < 1 && $value != -1) {
+    form_set_error('apachesolr_facet_limit', t('Please enter a number greater than 1 or -1 for the facet query limit.'));
+    return FALSE;
+  }
+}
+
+/**
+ * Implementation of hook_form_alter().
+ */
 function apachesolr_form_alter($form_id, &$form) {
   $arg = arg(1);
   $alias = drupal_lookup_path('alias', "search/{$arg}");
   // Ok, this really sucks. I want a way to know whether the action of the form
-  // is suposed to be handled by an ApacheSolr module or not. I manually
+  // is supposed to be handled by an ApacheSolr module or not. I manually
   // exclude node and user here, but there are many other hook_search implementations
   // in the wild and this code will potentially interfere with them. It also
   // creates a Solr instance wasting resources.
   if ($arg != 'node' && $arg != 'user' && (
-      preg_match("&/search/{$arg}&", $form['#action']) ||
-      preg_match("&/{$alias}&", $form['#action'])  ||
-      strpos($form['#action'], $alias))) {
+    preg_match("&/search/{$arg}&", $form['#action']) ||
+    preg_match("&/{$alias}&", $form['#action'])  ||
+    strpos($form['#action'], $alias))) {
     if (!isset($_POST['form_id'])) {
       // Set up our validation function
       $form['#validate']['apachesolr_search_validate'] = array();
@@ -647,7 +672,7 @@ function &apachesolr_get_solr($host = 'l
 
   if (empty($solr_cache[$host][$port][$path])) {
     $include_path = get_include_path();
-    set_include_path ('./'. drupal_get_path('module', 'apachesolr') .'/SolrPhpClient/');
+    set_include_path('./'. drupal_get_path('module', 'apachesolr') .'/SolrPhpClient/');
     include_once('Apache/Solr/Service.php');
     set_include_path($include_path);
     $solr_cache[$host][$port][$path] = new Apache_Solr_Service($host, $port, $path);
@@ -684,14 +709,14 @@ function &apachesolr_drupal_query($keys 
     $keys = search_get_keys();
   }
   if (empty($_queries) || empty($_queries[$keys])) {
-    include_once drupal_get_path('module', 'apachesolr'). '/Solr_Base_Query.php';
+    include_once drupal_get_path('module', 'apachesolr') .'/Solr_Base_Query.php';
     $_queries[$keys] = new Solr_Base_Query($keys);
   }
   return $_queries[$keys];
 }
 
 function apachesolr_base_url() {
-  return "http://". variable_get('apachesolr_host', 'localhost'). ':'. variable_get('apachesolr_port', '8983'). variable_get('apachesolr_path', '/solr');
+  return "http://" . variable_get('apachesolr_host', 'localhost') .':'. variable_get('apachesolr_port', '8983') . variable_get('apachesolr_path', '/solr');
 }
 
 /**
@@ -775,7 +800,7 @@ function theme_apachesolr_facet_item($na
     return $unclick_link . " $name";
   }
   else {
-    return l($name. " ($count)",  $path, $attributes);
+    return l($name . " ($count)",  $path, $attributes);
   }
 }
 
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.11
diff -u -p -r1.1.2.11 apachesolr_search.module
--- apachesolr_search.module	19 Jul 2008 14:22:43 -0000	1.1.2.11
+++ apachesolr_search.module	29 Jul 2008 16:48:20 -0000
@@ -7,10 +7,16 @@
  *   Apache Solr search application.
  */
 
+/**
+ * Implementation of hook_update_index().
+ */
 function apachesolr_update_index() {
   ApacheSolrUpdate::update_index('apachesolr');
 }
 
+/**
+ * Implementation of hook_search().
+ */
 function apachesolr_search_search($op = 'search', $keys = NULL) {
 
   switch ($op) {
@@ -36,9 +42,11 @@ function apachesolr_search_search($op = 
       $solr =& apachesolr_get_solr(variable_get('apachesolr_host', 'localhost'), variable_get('apachesolr_port', 8983), variable_get('apachesolr_path', '/solr'));
       // This is the object that knows about the query coming from the user.
       $query =& apachesolr_drupal_query($keys);
+      $results = array();
       
-      try {      
+      try {
         $params = array(
+          //'qt' => 'standard',
           'fl' => '*,score',
           'rows' => variable_get('apachesolr_rows', 10),
           'facet' => 'true',
@@ -64,17 +72,14 @@ function apachesolr_search_search($op = 
           $sort = check_plain($_GET['solrsort']);
           $params['sort'] = $sort;
         }
-        
-        if ($sort = check_plain($_GET['solrsort'])) {
-          $params['sort'] = $sort;
-        }
         if ($fields = apachesolr_cck_fields()) {
           foreach ($fields as $name => $field) {
             $index_key = apachesolr_index_key($field);
             $params['facet.field'][] = $index_key;
           }
         }
-        $params['start'] = $_GET['page'] * $params['rows'];
+        $page = isset($_GET['page']) ? $_GET['page'] : 0;
+        $params['start'] = $page * $params['rows'];
         $response = $solr->search($query->get_query(), $params['start'], $params['rows'], $params);
         apachesolr_has_searched(TRUE);
         $total = $response->numFound;
@@ -83,7 +88,6 @@ function apachesolr_search_search($op = 
         apachesolr_static_response_cache($response);
         pager_query("SELECT %d", $params['rows'], 0, NULL, $total);
         if ($total > 0) {
-          static $users = array();
           foreach ($response->documents as $doc) {
             $extra = node_invoke_nodeapi(&$doc, 'search result');
             $extra['score'] = $doc->score;
Index: schema.xml
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/schema.xml,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 schema.xml
--- schema.xml	14 Jun 2008 18:44:29 -0000	1.1.2.2
+++ schema.xml	29 Jul 2008 16:48:20 -0000
@@ -256,7 +256,7 @@
    <field name="vid"  type="integer" indexed="true" stored="true" multiValued="true"/>
    <field name="taxonomy_name" type="string" indexed="true" stored="true" multiValued="true"/>
    <field name="text" type="text" indexed="true" stored="false"/>
-
+   <field name="language" type="string" indexed="true" stored="true"/>
 
    <!-- Here, default is used to create a "timestamp" field indicating
         When each document was indexed.
Index: contrib/apachesolr_image/apachesolr_image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/contrib/apachesolr_image/Attic/apachesolr_image.module,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 apachesolr_image.module
--- contrib/apachesolr_image/apachesolr_image.module	14 Jun 2008 18:44:30 -0000	1.1.2.2
+++ contrib/apachesolr_image/apachesolr_image.module	29 Jul 2008 16:48:21 -0000
@@ -53,10 +53,10 @@ function phptemplate_search_item($item, 
   $break = '';
   if ($node = $item['node']) {
     if ($path = $node->ssfield_imagemodule_image) {
-      $item['snippet'] = '<span class="image">'. theme('image', $path, '', '', array('align' => 'left')). '</span>'. $item['snippet'];
+      $item['snippet'] = '<span class="image">'. theme('image', $path, '', '', array('align' => 'left')) .'</span>'. $item['snippet'];
       $break = '<br clear="all"/>';
     }
   }
-  $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] . $break. '</p>' : '') .'<p class="search-info">'. implode(' - ', $info) .'</p></dd>';
+  $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] . $break .'</p>' : '') .'<p class="search-info">'. implode(' - ', $info) .'</p></dd>';
   return $output;
 }
