about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/SearchIdx.pm2
-rw-r--r--t/search.t9
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index f9b40b0d..fd766277 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -385,11 +385,13 @@ sub remove_message {
         my $db = $self->{xdb};
         my $called;
         $mid = mid_clean($mid);
+        my $over = $self->{over};
 
         eval {
                 batch_do($self, 'Q' . $mid, sub {
                         my ($ids) = @_;
                         $db->delete_document($_) for @$ids;
+                        $over->delete_articles($ids) if $over;
                         $called = 1;
                 });
         };
diff --git a/t/search.t b/t/search.t
index 516f5670..48c2511c 100644
--- a/t/search.t
+++ b/t/search.t
@@ -409,8 +409,15 @@ sub filter_mids {
         my $txt = $ro->query('"inside another"');
         is($txt->[0]->mid, $res->[0]->mid,
                 'search inside text attachments works');
+
+        my $mid = $n->[0]->mid;
+        my ($id, $prev);
+        my $art = $ro->next_by_mid($mid, \$id, \$prev);
+        ok($art, 'article exists in OVER DB');
+        $rw->unindex_blob($amsg);
+        $rw->commit_txn_lazy;
+        is($ro->lookup_article($art->{num}), undef, 'gone from OVER DB');
 }
-$rw->commit_txn_lazy;
 
 done_testing();