]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
searchidx: fix fallback on unindex miss
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 569efbb0debcdf1b7c9939b6838eda1d8819e017..662055c6595fcbcdb156253356612ee6e4a353fc 100644 (file)
@@ -468,11 +468,13 @@ sub remove_eidx_info {
        my ($self, $docid, $oid, $eidx_key, $eml) = @_;
        begin_txn_lazy($self);
        my $doc = _get_doc($self, $docid, $oid) or return;
-       $doc->remove_term('O'.$eidx_key);
+       eval { $doc->remove_term('O'.$eidx_key) };
+       warn "W: ->remove_term O$eidx_key: $@\n" if $@;
        for my $l ($eml->header_raw('List-Id')) {
                $l =~ /<([^>]+)>/ or next;
                my $lid = lc $1;
-               $doc->remove_term('G' . $lid);
+               eval { $doc->remove_term('G' . $lid) };
+               warn "W: ->remove_term G$lid: $@\n" if $@;
 
                # nb: we don't remove the XL probabilistic terms
                # since terms may overlap if cross-posted.
@@ -552,8 +554,8 @@ sub unindex_eml {
                $tmp{$_}++ for @removed;
        }
        if (!$nr) {
-               $mids = join('> <', @$mids);
-               warn "W: <$mids> missing for removal from overview\n";
+               my $m = join('> <', @$mids);
+               warn "W: <$m> missing for removal from overview\n";
        }
        while (my ($num, $nr) = each %tmp) {
                warn "BUG: $num appears >1 times ($nr) for $oid\n" if $nr != 1;