projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f9221f
)
search: use relevance as secondary sort by default
author
Eric Wong <e@80x24.org>
Sat, 5 Sep 2015 07:22:55 +0000 (07:22 +0000)
committer
Eric Wong <e@80x24.org>
Sat, 5 Sep 2015 07:22:55 +0000 (07:22 +0000)
Might as well give relevance some weight if the timestamp is tied.
lib/PublicInbox/Search.pm
patch
|
blob
|
history
diff --git
a/lib/PublicInbox/Search.pm
b/lib/PublicInbox/Search.pm
index fd79b63f6311a7539df8d5e1e6869573a538ece7..1874ee9df6d4a6d7ef92881def30abc2aee7a44f 100644
(file)
--- a/
lib/PublicInbox/Search.pm
+++ b/
lib/PublicInbox/Search.pm
@@
-118,7
+118,7
@@
sub do_enquire {
if ($opts->{relevance}) {
$enquire->set_sort_by_relevance_then_value(TS, 1);
} else {
- $enquire->set_sort_by_value(TS, 1);
+ $enquire->set_sort_by_value
_then_relevance
(TS, 1);
}
$opts ||= {};
my $offset = $opts->{offset} || 0;