about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchView.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-10-05 23:47:28 +0000
committerEric Wong <e@80x24.org>2016-10-05 23:53:35 +0000
commit3c9dd6619f825f0515e7e4afa1bd55c99c1a68d3 (patch)
tree60c997b670ccd6b7a1fc10aa46232f86afa4e3da /lib/PublicInbox/SearchView.pm
parent728d8dbcb920cd19f2fe4d7479d770c540274690 (diff)
downloadpublic-inbox-3c9dd6619f825f0515e7e4afa1bd55c99c1a68d3.tar.gz
This bug was hidden, and we may not be able to efficiently
implement a topmost subroutine with the hash-based (vs
linked-list) based container for threading in the next
commit.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r--lib/PublicInbox/SearchView.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index ebeb41f7..cfe6dfff 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -155,9 +155,8 @@ sub mset_thread {
         $th->thread;
         if ($q->{r}) { # order by relevance
                 $th->order(sub {
-                        [ sort { (eval { $pct{$b->topmost->{id}} } || 0)
-                                        <=>
-                                (eval { $pct{$a->topmost->{id}} } || 0)
+                        [ sort { ( $pct{$b->{id}} || 0) <=>
+                                 ( $pct{$a->{id}} || 0)
                         } @{$_[0]} ];
                 });
         } else { # order by time (default for threaded view)