about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiSavedSearch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiSavedSearch.pm')
-rw-r--r--lib/PublicInbox/LeiSavedSearch.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiSavedSearch.pm b/lib/PublicInbox/LeiSavedSearch.pm
index 2a0e9321..fd51fe38 100644
--- a/lib/PublicInbox/LeiSavedSearch.pm
+++ b/lib/PublicInbox/LeiSavedSearch.pm
@@ -243,6 +243,16 @@ sub pause_dedupe {
         $oidx->commit_lazy;
 }
 
+sub reset_dedupe {
+        my ($self) = @_;
+        prepare_dedupe($self);
+        my $lk = $self->lock_for_scope_fast;
+        for my $t (qw(xref3 over id2num)) {
+                $self->{oidx}->{dbh}->do("DELETE FROM $t");
+        }
+        pause_dedupe($self);
+}
+
 sub mm { undef }
 
 sub altid_map { {} }