 Index: git-foo/addressbook/backends/file/e-book-backend-file-index.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-foo/addressbook/backends/file/e-book-backend-file-index.h	2008-05-02 17:26:36.000000000 +0100
-@@ -0,0 +1,48 @@
++++ git-foo/addressbook/backends/file/e-book-backend-file-index.h	2008-05-06 12:34:14.000000000 +0100
+@@ -0,0 +1,67 @@
++/*
++ * Copyright (C) 2008 OpenedHand Ltd
++ *
++ * This program is free software; you can redistribute it and/or modify it under
++ * the terms of version 2 of the GNU Lesser General Public License as published
++ * by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++ * details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program; if not, write to the Free Software Foundation, Inc.,
++ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * Author: Rob Bradford <rob@openedhand.com>
++ */
++
 +#ifndef _E_BOOK_BACKEND_FILE_INDEX
 +#define _E_BOOK_BACKEND_FILE_INDEX
 +

 };
 
 G_LOCK_DEFINE_STATIC (global_env);
@@ -642,6 +645,12 @@
 	d(printf ("signalling parent thread\n"));
 	e_flag_set (closure->running);
 
+
+	if (e_book_backend_file_index_is_usable (bf->priv->index, query))
+	{
+		g_debug ("Able to use EBookBackendFileIndex for %s", query);
+	}
+
 	if (e_book_backend_summary_is_summary_query (bf->priv->summary, query)) {
 		/* do a summary query */
 		GPtrArray *ids = e_book_backend_summary_search (bf->priv->summary, e_data_book_view_get_card_query (book_view));
@@ -1143,6 +1152,7 @@
 	time_t db_mtime;
 	struct stat sb;
 	gchar *uri;

+
+  while (db_error == 0)
+  {
+    g_debug ("Considering %s against %s", id_dbt.data, uid);
+    /* if the id is the one we're lookin for then delete! */
+    if (g_str_equal ((gchar *)id_dbt.data, uid))
+    {
