diff options
author | Eric Wong <e@80x24.org> | 2016-01-04 01:01:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-01-04 01:01:41 +0000 |
commit | 0d613bfde45bdf3e28d1a247ffc59e6f805dc64a (patch) | |
tree | 7fa22b413a8f165e20eb318c286e2aef62784d55 | |
parent | 19a602120d1e593c8045672e842f38b29910db03 (diff) | |
download | public-inbox-0d613bfde45bdf3e28d1a247ffc59e6f805dc64a.tar.gz |
The threaded search view is somewhat alien to new users, so ensure we label the word "relevance" for them.
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/View.pm | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 5d4f4fe2..b3ddcb54 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -56,6 +56,8 @@ sub sres_top_html { [$code, ['Content-Type'=>'text/html; charset=UTF-8'], [$res]]; } +# display non-threaded search results similar to what users expect from +# regular WWW search engines: sub dump_mset { my ($res, $mset) = @_; diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index fac0fcb1..4fc8ffc3 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -140,8 +140,8 @@ sub index_entry { } $rv .= " <a\nhref=\"$parent_anchor\">parent</a>"; } - if (my $pct = $state->{pct}) { - $rv .= " [$pct->{$mid_raw}%]"; + if (my $pct = $state->{pct}) { # used by SearchView.pm + $rv .= " [relevance $pct->{$mid_raw}%]"; } elsif ($srch) { if ($ctx->{flat}) { $rv .= " [<a\nhref=\"${path}$href/t/#u\">threaded</a>" . |