about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdxShard.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/SearchIdxShard.pm')
-rw-r--r--lib/PublicInbox/SearchIdxShard.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm
index cb79f3dc..59b36087 100644
--- a/lib/PublicInbox/SearchIdxShard.pm
+++ b/lib/PublicInbox/SearchIdxShard.pm
@@ -89,16 +89,20 @@ sub shard_worker_loop ($$$$$) {
 
 # called by V2Writable
 sub index_raw {
-        my ($self, $msgref, $mime, $smsg) = @_;
+        my ($self, $msgref, $eml, $smsg) = @_;
         if (my $w = $self->{w}) {
                 # mid must be last, it can contain spaces (but not LF)
                 print $w join(' ', @$smsg{qw(raw_bytes bytes
                                                 num blob ds ts mid)}),
                         "\n", $$msgref or die "failed to write shard $!\n";
         } else {
-                $$msgref = undef;
+                if ($eml) {
+                        $$msgref = undef;
+                } else { # --xapian-only + --sequential-shard:
+                        $eml = PublicInbox::Eml->new($msgref);
+                }
                 $self->begin_txn_lazy;
-                $self->add_message($mime, $smsg);
+                $self->add_message($eml, $smsg);
         }
 }