diff options
author | Eric Wong <e@80x24.org> | 2020-12-04 22:03:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-05 21:41:52 +0000 |
commit | 6ef28d7e22a499b8a9d531d1c16acd4847496e8e (patch) | |
tree | c7f2d92cdf38e1e02b6adb4208fff34fda911a88 /lib/PublicInbox/SearchView.pm | |
parent | 726d6e71aee5d974615fa8097a482382a5064e5d (diff) | |
download | public-inbox-6ef28d7e22a499b8a9d531d1c16acd4847496e8e.tar.gz |
There's no need to export it, as shown by the change to SearchView. This should pave the way to making search more flexible and allow per-Inbox search to reuse ->ALL.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index c482f1c9..26426c01 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -14,7 +14,7 @@ use PublicInbox::WwwAtomStream; use PublicInbox::WwwStream qw(html_oneshot); use PublicInbox::SearchThread; use PublicInbox::SearchQuery; -use PublicInbox::Search qw(mdocid); +use PublicInbox::Search; my %rmap_inc; sub mbox_results { @@ -287,13 +287,12 @@ sub get_pct ($) { sub mset_thread { my ($ctx, $mset, $q) = @_; my $ibx = $ctx->{-inbox}; - my $nshard = $ibx->search->{nshard} // 1; - my %pct = map { mdocid($nshard, $_) => get_pct($_) } $mset->items; - my $msgs = $ibx->over->get_all(keys %pct); - $_->{pct} = $pct{$_->{num}} for @$msgs; + my @pct = map { get_pct($_) } $mset->items; + my $msgs = $ibx->search->mset_to_smsg($ibx, $mset); + my $i = 0; + $_->{pct} = $pct[$i++] for @$msgs; my $r = $q->{r}; if ($r) { # for descriptions in search_nav_bot - my @pct = values %pct; $q->{-min_pct} = min(@pct); $q->{-max_pct} = max(@pct); } |