diff options
author | Eric Wong <e@80x24.org> | 2020-10-27 07:54:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-11-07 10:22:10 +0000 |
commit | c44b4b959772cf11b530055c9f67651518ea4927 (patch) | |
tree | dda5e670f9d30154648317810515011f881d82f2 /lib/PublicInbox/SearchIdx.pm | |
parent | d2eb1ae16e4d3aaa5bece96f17b2fa4561d5b18e (diff) | |
download | public-inbox-c44b4b959772cf11b530055c9f67651518ea4927.tar.gz |
searchidx: ignore exceptions from ->remove_term
This seems necessary for some cross-posted messages (and we did it historically before we used over.sqlite3).
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 569efbb0..06d1a9f5 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -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. |