my $oid = $new_smsg->{blob};
my $ibx = delete $req->{ibx} or die 'BUG: {ibx} unset';
$self->{oidx}->add_xref3($docid, $req->{xnum}, $oid, $ibx->eidx_key);
- $idx->index_eml($eml, $new_smsg, $ibx->eidx_key);
+ $new_smsg->{eidx_key} = $ibx->eidx_key;
+ $idx->index_eml($eml, $new_smsg);
check_batch_limit($req);
}
my $top_smsg = pop @$stable;
$top_smsg == $smsg or die 'BUG: top_smsg != smsg';
my $ibx = _ibx_for($self, $sync, $smsg);
- $idx->index_eml($eml, $smsg, $ibx->eidx_key);
+ $smsg->{eidx_key} = $ibx->eidx_key;
+ $idx->index_eml($eml, $smsg);
for my $x (reverse @$stable) {
$ibx = _ibx_for($self, $sync, $x);
my $hdr = delete $x->{hdr} // die 'BUG: no {hdr}';
}
sub index_eml {
- my ($self, $eml, $smsg, $eidx_key) = @_;
- $smsg->{eidx_key} = $eidx_key if defined $eidx_key;
+ my ($self, $eml, $smsg) = @_;
$self->ipc_do('add_xapian', $eml, $smsg);
}