]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ExtSearchIdx.pm
extindex: add undocumented --no-scan switch
[public-inbox.git] / lib / PublicInbox / ExtSearchIdx.pm
index 778154a564b20433cf841adcd596ae121bb63ac7..07e646985a4715d273b2f7b7f80f2c0374179d7b 100644 (file)
@@ -881,9 +881,11 @@ sub eidx_sync { # main entry point
        }
 
        # don't use $_ here, it'll get clobbered by reindex_checkpoint
-       for my $ibx (@{$self->{ibx_list}}) {
-               last if $sync->{quit};
-               sync_inbox($self, $sync, $ibx);
+       if ($opt->{scan} // 1) {
+               for my $ibx (@{$self->{ibx_list}}) {
+                       last if $sync->{quit};
+                       sync_inbox($self, $sync, $ibx);
+               }
        }
        $self->{oidx}->rethread_done($opt) unless $sync->{quit};
        eidxq_process($self, $sync) unless $sync->{quit};