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 03/11] search: show newest results first
  @ 2015-09-01  8:55  7% ` Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2015-09-01  8:55 UTC (permalink / raw)
  To: meta

Like revision control history, older stuff is less relevant,
so favor newer stuff, first.
---
 lib/PublicInbox/Search.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 831c4fd..8b32ef3 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -115,9 +115,9 @@ sub do_enquire {
 	}
 	$enquire->set_query($query);
 	if ($opts->{relevance}) {
-		$enquire->set_sort_by_relevance_then_value(TS, 0);
+		$enquire->set_sort_by_relevance_then_value(TS, 1);
 	} else {
-		$enquire->set_sort_by_value(TS, 0);
+		$enquire->set_sort_by_value(TS, 1);
 	}
 	$opts ||= {};
 	my $offset = $opts->{offset} || 0;
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-01  8:55     [PATCH 01/11] search: reduce redundant doc data Eric Wong
2015-09-01  8:55  7% ` [PATCH 03/11] search: show newest results first 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).