user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/4] view: label "relevance" in threaded search view
  2016-01-04  1:03  5% [PATCH 0/4] misc updates to push Eric Wong
@ 2016-01-04  1:03  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-01-04  1:03 UTC (permalink / raw)
  To: meta

The threaded search view is somewhat alien to new users,
so ensure we label the word "relevance" for them.
---
 lib/PublicInbox/SearchView.pm | 2 ++
 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 5d4f4fe..b3ddcb5 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 fac0fcb..4fc8ffc 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>" .
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] misc updates to push
@ 2016-01-04  1:03  5% Eric Wong
  2016-01-04  1:03  7% ` [PATCH 4/4] view: label "relevance" in threaded search view Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-01-04  1:03 UTC (permalink / raw)
  To: meta

4 changes:
      examples/public-inbox.psgi: shorten to simplify
      www: comments for denoting Plack::Request vs CGI
      misc doc updates
      view: label "relevance" in threaded search view

 HACKING                       |  5 ++++-
 README                        |  3 ++-
 TODO                          | 12 ++++++++++++
 examples/public-inbox.psgi    |  6 +++---
 lib/PublicInbox/ExtMsg.pm     |  2 +-
 lib/PublicInbox/Feed.pm       |  2 +-
 lib/PublicInbox/SearchView.pm |  2 ++
 lib/PublicInbox/View.pm       |  4 ++--
 lib/PublicInbox/WWW.pm        |  3 ++-
 9 files changed, 29 insertions(+), 10 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-01-04  1:03  5% [PATCH 0/4] misc updates to push Eric Wong
2016-01-04  1:03  7% ` [PATCH 4/4] view: label "relevance" in threaded search view Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).