diff --git a/camel/ChangeLog b/camel/ChangeLog
index 8bc90e9..2b773f9 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,10 @@
 2008-10-06  Srinivasa Ragavan  <sragavan@novell.com>
 
+	* camel/camel-folder-search.c: Allow thread based searches by falling
+	back on the old in-memory search model.
+
+2008-10-06  Srinivasa Ragavan  <sragavan@novell.com>
+
 	** Fixes lots of bugs and breaks ABI
 
 	* camel/camel-db.c: Added new APIs and support for cloning handles.
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index c3ec85a..839f217 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -422,8 +422,8 @@ camel_folder_search_count(CamelFolderSearch *search, const char *expr, CamelExce
 	
 	p->ex = ex;
 
-	/* We route body-contains search and uid search through memory and not via db. */
-	if (strstr((const char *) expr, "body-contains")) {
+	/* We route body-contains search and thread based search through memory and not via db. */
+	if (strstr((const char *) expr, "body-contains") || strstr((const char *) expr, "match-threads")) {
 		/* setup our search list only contains those we're interested in */
 		search->summary = camel_folder_get_summary(search->folder);
 
@@ -547,8 +547,8 @@ camel_folder_search_search(CamelFolderSearch *search, const char *expr, GPtrArra
 	
 	p->ex = ex;
 
-	/* We route body-contains search and uid search through memory and not via db. */
-	if (uids || strstr((const char *) expr, "body-contains")) {
+	/* We route body-contains / thread based search and uid search through memory and not via db. */
+	if (uids || strstr((const char *) expr, "body-contains") || strstr((const char *) expr, "match-threads")) {
 		/* setup our search list only contains those we're interested in */
 		search->summary = camel_folder_get_summary(search->folder);
 
