about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiStore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r--lib/PublicInbox/LeiStore.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index d686e95a..4f77e8fa 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -199,6 +199,7 @@ sub add_eml {
         $im->add($eml, undef, $smsg) or return; # duplicate returns undef
         my $msgref = delete $smsg->{-raw_email};
         $smsg->{bytes} = $smsg->{raw_bytes} + crlf_adjust($$msgref);
+        undef $msgref;
 
         local $self->{current_info} = $smsg->{blob};
         if (my @docids = _docids_for($self, $eml)) {
@@ -215,7 +216,7 @@ sub add_eml {
                 $oidx->add_overview($eml, $smsg);
                 $oidx->add_xref3($smsg->{num}, -1, $smsg->{blob}, '.');
                 my $idx = $eidx->idx_shard($smsg->{num});
-                $idx->index_raw($msgref, $eml, $smsg);
+                $idx->index_eml($eml, $smsg);
                 $idx->ipc_do('add_keywords', $smsg->{num}, @kw) if @kw;
                 $smsg;
         }