diff options
author | Eric Wong <e@80x24.org> | 2021-05-31 10:20:06 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-06-01 17:03:04 +0000 |
commit | 693247be6380c4f278ebc0c4f17c1ac995a831d3 (patch) | |
tree | 6e6b0d64bc7363805125af530f937c9e8c4a295c /lib/PublicInbox/LeiSearch.pm | |
parent | 525d14996e820e7bf2b5e035cf5826b6530f6d92 (diff) | |
download | public-inbox-693247be6380c4f278ebc0c4f17c1ac995a831d3.tar.gz |
We don't need to write VMD changes to lei/store if local keywords are unchanged.
Diffstat (limited to 'lib/PublicInbox/LeiSearch.pm')
-rw-r--r-- | lib/PublicInbox/LeiSearch.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiSearch.pm b/lib/PublicInbox/LeiSearch.pm index b09d1e45..d0963e92 100644 --- a/lib/PublicInbox/LeiSearch.pm +++ b/lib/PublicInbox/LeiSearch.pm @@ -133,9 +133,11 @@ sub xoids_for { # returns true if $eml is indexed by lei/store and keywords don't match sub kw_changed { my ($self, $eml, $new_kw_sorted, $docids) = @_; - my $xoids = xoids_for($self, $eml) // return; - $docids //= []; - @$docids = sort { $a <=> $b } values %$xoids; + if ($eml) { + my $xoids = xoids_for($self, $eml) // return; + $docids //= []; + @$docids = sort { $a <=> $b } values %$xoids; + } my $cur_kw = msg_keywords($self, $docids->[0]); # RFC 5550 sec 5.9 on the $Forwarded keyword states: |