}
sub index_xapian { # msg_iter callback
- my $part = $_[0]->[0]; # ignore $depth and @idx
+ my $part = $_[0]->[0]; # ignore $depth and $idx
my ($self, $doc) = @{$_[1]};
my $ct = $part->content_type || 'text/plain';
my $fn = $part->filename;
}
}
$doc->add_boolean_term('Q' . $_) foreach @$mids;
+ for my $l ($hdr->header_raw('List-Id')) {
+ $l =~ /<([^>]+)>/ or next;
+ my $lid = $1;
+ $doc->add_boolean_term('G' . $lid);
+ index_text($self, $lid, 1, 'XL'); # probabilistic
+ }
$self->{xdb}->replace_document($smsg->{num}, $doc);
}