$th->thread;
if ($q->{r}) { # order by relevance
$th->order(sub {
- [ sort { ( $pct{$b->{id}} || 0) <=>
- ( $pct{$a->{id}} || 0)
+ [ sort { (eval { $pct{$b->topmost->{id}} } || 0)
+ <=>
+ (eval { $pct{$a->topmost->{id}} } || 0)
} @{$_[0]} ];
});
} else { # order by time (default for threaded view)
$x = qq{$x - search results};
$feed_opts->{atomurl} = $feed_opts->{url} . '?'. $q->qs_html;
$feed_opts->{url} .= '?'. $q->qs_html(x => undef);
- $x = PublicInbox::Feed::atom_header($feed_opts, $x);
+ $x = PublicInbox::Feed::atom_header($feed_opts, "<title>$x</title>");
$fh->write($x. PublicInbox::Feed::feed_updated());
for ($mset->items) {