commit d7ec4cc80e13d57981e70fd7d987cee3066400d9
Author: Damien Tournoud <damien@commerceguys.com>
Date:   Thu Jul 28 16:53:49 2011 +0200

    Support list<text> fields properly in the DB engine.

diff --git a/contrib/search_api_db/service.inc b/contrib/search_api_db/service.inc
index a09946a..5c8fd54 100644
--- a/contrib/search_api_db/service.inc
+++ b/contrib/search_api_db/service.inc
@@ -236,7 +236,9 @@ class SearchApiDbService extends SearchApiAbstractService {
       $fields[$name]['type'] = $new_type;
       $fields[$name]['boost'] = $new_fields[$name]['boost'];
       if ($old_type != $new_type) {
-        if ($old_type == 'text' || $new_type == 'text') {
+        $old_inner_type = search_api_extract_inner_type($old_type);
+        $new_inner_type = search_api_extract_inner_type($new_type);
+        if ($old_inner_type == 'text' || $new_inner_type == 'text') {
           // A change in fulltext status necessitates completely clearing the index.
           $reindex = TRUE;
           if (!$cleared) {
@@ -246,17 +248,17 @@ class SearchApiDbService extends SearchApiAbstractService {
           db_drop_table($field['table']);
           $this->createFieldTable($index, $new_fields[$name], $field['table']);
         }
-        elseif ($this->sqlType($old_type) != $this->sqlType($new_type)) {
+        elseif ($this->sqlType($old_inner_type) != $this->sqlType($new_inner_type)) {
           // There is a change in SQL type. We don't have to clear the index, since types can be converted.
           db_change_field($field['table'], 'value', 'value', $this->sqlType($new_type) + array('description' => "The field's value for this item."));
           $reindex = TRUE;
         }
-        elseif ($old_type == 'date' || $new_type == 'date') {
+        elseif ($old_inner_type == 'date' || $new_inner_type == 'date') {
           // Even though the SQL type stays the same, we have to reindex since conversion rules change.
           $reindex = TRUE;
         }
       }
-      elseif (!$reindex && $new_type == 'text' && $field['boost'] != $new_fields[$name]['boost']) {
+      elseif (!$reindex && $new_inner_type == 'text' && $field['boost'] != $new_fields[$name]['boost']) {
         $multiplier = $new_fields[$name]['boost'] / $field['boost'];
         db_update($field['table'], $this->query_options)
           ->expression('score', 'score * :mult', array(':mult' => $multiplier))
