about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-09 05:04:41 -0700
committerEric Wong <e@80x24.org>2021-10-09 21:31:10 +0000
commit8ffed15abbec68463ff3f3105d6651c8a4b5d813 (patch)
treebe0af668a622e5ff6e48af95433d56a4b2b160c5 /lib
parent2eac33fffcf1757675a959e69eb34f04e446bd25 (diff)
downloadpublic-inbox-8ffed15abbec68463ff3f3105d6651c8a4b5d813.tar.gz
This mode only checks history for missed/stale messages
and doesn't attempt to reindex messages which are already
indexed.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 7cc8dd95..20c4cf78 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -811,7 +811,7 @@ sub _reindex_check_unseen ($$$) {
         local $sync->{-regen_fmt} =
                         "$ekey checking unseen %u/".$ibx->over->max."\n";
         ${$sync->{nr}} = 0;
-
+        my $fast = $sync->{-opt}->{fast};
         while (scalar(@{$msgs = $ibx->over->query_xover($beg, $end)})) {
                 ${$sync->{nr}} = $beg;
                 $beg = $msgs->[-1]->{num} + 1;
@@ -835,7 +835,7 @@ ibx_id = ? AND xnum = ? AND oidbin = ?
                         # the first time around ASAP:
                         if (scalar(@$docids) == 0) {
                                 reindex_unseen($self, $sync, $ibx, $xsmsg);
-                        } else { # already seen, reindex later
+                        } elsif (!$fast) { # already seen, reindex later
                                 for my $r (@$docids) {
                                         $self->{oidx}->eidxq_add($r->[0]);
                                 }
@@ -853,7 +853,7 @@ sub _reindex_check_stale ($$$) {
         my $fetching;
         my $ekey = $ibx->eidx_key;
         local $sync->{-regen_fmt} =
-                        "$ekey check stale/missing %u/".$ibx->over->max."\n";
+                        "$ekey checking stale/missing %u/".$ibx->over->max."\n";
         ${$sync->{nr}} = 0;
         do {
                 if (checkpoint_due($sync)) {