diff options
author | Eric Wong <e@yhbt.net> | 2020-08-20 20:24:57 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-20 21:11:25 +0000 |
commit | 5301a9d1b07ad5af1b62df870b7181461603f460 (patch) | |
tree | c693a4fd2572ee0cf379a2cc68101e41897b7373 /lib/PublicInbox/ExtMsg.pm | |
parent | f344d64066f85dd6737daeb42c94902e1bbfda78 (diff) | |
download | public-inbox-5301a9d1b07ad5af1b62df870b7181461603f460.tar.gz |
We can avoid importing mdocid() in several places by using this method, simplifying callers.
Diffstat (limited to 'lib/PublicInbox/ExtMsg.pm')
-rw-r--r-- | lib/PublicInbox/ExtMsg.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm index 5c23dc31..65892161 100644 --- a/lib/PublicInbox/ExtMsg.pm +++ b/lib/PublicInbox/ExtMsg.pm @@ -11,7 +11,6 @@ use warnings; use PublicInbox::Hval qw(ascii_html prurl mid_href); use PublicInbox::WwwStream qw(html_oneshot); use PublicInbox::Smsg; -use PublicInbox::Search qw(mdocid); our $MIN_PARTIAL_LEN = 16; # TODO: user-configurable @@ -61,7 +60,6 @@ sub search_partial ($$) { } } - my $n = $srch->{nshard} // 1; foreach my $m (@try) { # If Xapian can't handle the wildcard since it # has too many results. $@ can be @@ -70,7 +68,7 @@ sub search_partial ($$) { my $mset = eval { $srch->query($m, $opt) } or next; my @mids = map { $_->{mid} - } @{$ibx->over->get_all(map { mdocid($n, $_) } $mset->items)}; + } @{$ibx->over->get_all(@{$srch->mset_to_artnums($mset)})}; return \@mids if scalar(@mids); } } |