diff options
author | Eric Wong <e@80x24.org> | 2021-02-08 08:33:39 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-09 07:51:03 +0000 |
commit | c1a2b1f49ef4fd6e1f0033cbe3e3bcd8f65aca37 (patch) | |
tree | 103457860523a8dc1cf884fefd0d5f5ec8b283f6 /lib/PublicInbox/Mbox.pm | |
parent | 29e530f1c0694107ad25881a2c693c30783f85f1 (diff) | |
download | public-inbox-c1a2b1f49ef4fd6e1f0033cbe3e3bcd8f65aca37.tar.gz |
Order doesn't matter when users are completely downloading mboxrds onto the FS and then opening them with an MUA. The MUA is expected to sort the results in the user's preferred order. However, lei can start streaming the results to its destination Maildir (or eventually IMAP/JMAP mailbox) with an MUA already open. This will let users see recent results sooner in their MUA, as those tend to have a higher docid. This matches the behavior of the HTML results, as well. As a bonus, this is around ~5% faster in a one-off, informal test case with 66k results. I expect this to hold true in all all cases since git has always optimized storage to favor recent objects.
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r-- | lib/PublicInbox/Mbox.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index 1fca356b..94f733bc 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -235,7 +235,7 @@ sub mbox_all { my $over = $ctx->{ibx}->over or return PublicInbox::WWW::need($ctx, 'Overview'); - my $qopts = $ctx->{qopts} = { relevance => -1 }; # ORDER BY docid ASC + my $qopts = $ctx->{qopts} = { relevance => -2 }; # ORDER BY docid DESC $qopts->{threads} = 1 if $q->{t}; my $mset = $srch->mset($q_string, $qopts); $qopts->{offset} = $mset->size or |