 +  ESExpResult *sexp_result = NULL;
 +  gint i = 0;
 +  gint sexp_error = 0;
-+  gboolean res = FALSE; /* whether we can actually use the index */
++  gboolean res = TRUE; /* whether we can actually use the index */
 +
 +  sexp = e_sexp_new ();
 +

 		return GNOME_Evolution_Addressbook_Success;
 	} else {
 		g_warning (G_STRLOC ": db->put failed with %s", db_strerror (db_error));
@@ -642,7 +648,37 @@
 	d(printf ("signalling parent thread\n"));
 	e_flag_set (closure->running);
 
-	if (e_book_backend_summary_is_summary_query (bf->priv->summary, query)) {
+
+	if (e_book_backend_file_index_is_usable (bf->priv->index, query))
+	{
+		GPtrArray *ids = NULL;

Index: git-foo/addressbook/backends/file/Makefile.am
===================================================================
--- git-foo.orig/addressbook/backends/file/Makefile.am	2008-05-08 12:37:29.000000000 +0100
+++ git-foo/addressbook/backends/file/Makefile.am	2008-05-08 12:37:30.000000000 +0100
@@ -12,6 +12,8 @@
 libebookbackendfile_la_SOURCES =			\
 	e-book-backend-file.c				\
