diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala
index b3e02e8..57ca05c 100644
--- a/src/engine/imap-db/imap-db-folder.vala
+++ b/src/engine/imap-db/imap-db-folder.vala
@@ -1791,7 +1812,7 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
         updated_contacts = message_addresses.contacts;
     }
     
-    private void do_merge_email_in_search_table(Db.Connection cx, int64 message_id,
+    public void do_merge_email_in_search_table(Db.Connection cx, int64 message_id,
         Geary.Email.Field new_fields, Geary.Email email, Cancellable? cancellable) throws Error {
         if (new_fields.is_any_set(Geary.Email.REQUIRED_FOR_MESSAGE) &&
             email.fields.is_all_set(Geary.Email.REQUIRED_FOR_MESSAGE)) {
@@ -1921,11 +2012,15 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
             Geary.Email.Field new_fields;
             do_merge_message_row(cx, row, out new_fields, out updated_contacts,
                 ref new_unread_count, cancellable);
-            
-            if (do_check_for_message_search_row(cx, location.message_id, cancellable))
-                do_merge_email_in_search_table(cx, location.message_id, new_fields, combined_email, cancellable);
-            else
-                do_add_email_to_search_table(cx, location.message_id, combined_email, cancellable);
+
+            if (do_check_for_message_search_row(cx, location.message_id, cancellable)) {
+                Db.Statement stmt = cx.prepare(
+                    "DELETE FROM MessageSearchTable WHERE docid = ?"
+                );
+                stmt.bind_rowid(0, location.message_id);
+                stmt.exec(cancellable);
+            }
+            do_add_email_to_search_table(cx, location.message_id, combined_email, cancellable);
         } else {
             // If the email is ready to go, we still may need to update the unread count.
             Geary.EmailFlags? combined_flags = do_get_email_flags_single(cx, location.message_id,
