]> Sergey Matveev's repositories - public-inbox.git/commit
searchview: remove anonymous sub when sorting threads by relevance
authorEric Wong <e@80x24.org>
Wed, 25 Dec 2019 07:50:59 +0000 (07:50 +0000)
committerEric Wong <e@80x24.org>
Fri, 27 Dec 2019 20:00:37 +0000 (20:00 +0000)
commit9b5bf24a115346ef6095f4c613b4579fde112714
tree4c5a9b52b95cfbff19a6156922223e1b9a421d41
parent2d2b53538f1121e98ddc0652e2749bb90ea97769
searchview: remove anonymous sub when sorting threads by relevance

We don't need to return a closure or have a separate hash
for sorting threads by relevance.  Instead, we can stuff
the relevance {pct} into the SearchMsg object itself and
use that.

Note: upon reviewing this code, the sort-by-relevance seems
bogus as it only considers the relevance of the topmost message.
Instead, it would make more sense to the user to sort by the
highest relevance of all messages in that particular thread.
lib/PublicInbox/SearchView.pm
lib/PublicInbox/View.pm