  	e_book_backend_set_is_loaded (backend, TRUE);
  	e_book_backend_set_is_writable (backend, writable);
  	return GNOME_Evolution_Addressbook_Success;
-@@ -1474,12 +1517,19 @@
+@@ -1474,6 +1522,14 @@
  	}
  	
  	G_LOCK (global_env);

+struct _EBookBackendFileIndexPrivate {
+  DB *db;  /* primary database */
+  GHashTable *sdbs; /* mapping for query->term to database used for it */
+};
+
+static gboolean index_populate (EBookBackendFileIndex *index, GList *fields);

+
+  if (data->type == INDEX_FIELD_TYPE_STRING)
+  {
+    tmp = (gchar *)e_contact_get (contact, data->vfield);
+    value = g_utf8_casefold (tmp, -1);
+    g_free (tmp);
+    dbt_fill_with_string (&index_dbt, value);
+
+    g_debug (G_STRLOC ": adding to index with key %s and data %s", index_dbt.data, id_dbt.data);
+    db_error = db->put (db, NULL, &index_dbt, &id_dbt, 0);
+
+    if (db_error != 0)
+    {
+      g_warning (G_STRLOC ":db->put failed: %s", db_strerror (db_error));
+    }
+  } else if (data->type == INDEX_FIELD_TYPE_STRING_LIST) {
+    values = (GList *)e_contact_get (contact, E_CONTACT_IM_JABBER);
+
+    for  (l = values; l != NULL; l = l->next)
+    {
+      tmp = (gchar *)l->data;
+      value = g_utf8_casefold (tmp, -1);
+      g_free (tmp);
+
+      dbt_fill_with_string (&index_dbt, value);
+      g_debug (G_STRLOC ": adding to index with key %s and data %s", index_dbt.data, id_dbt.data);
+      db_error = db->put (db, NULL, &index_dbt, &id_dbt, 0);
+
+      if (db_error != 0)
+      {
+        g_warning (G_STRLOC ": db->put failed: %s", db_strerror (db_error));
+      }
+    }
+  } else {
+    g_warning (G_STRLOC ": Unexpected field type.");
+  }
+
+  db_error = db->sync (db, 0);
