diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-21 01:52:58 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-22 00:12:39 +0000 |
commit | 8e52e5fdea416d6fda0b8d301144af0c043a5a76 (patch) | |
tree | dafe724cfb77f00e8cb50d89a2f03b50d8c330cb /lib/PublicInbox/Search.pm | |
parent | 54590383027a67d11953690cbb6390347757730b (diff) | |
download | public-inbox-8e52e5fdea416d6fda0b8d301144af0c043a5a76.tar.gz |
We want to rely on Date: to sort messages within individual threads since it keeps messages from git-send-email(1) sorted. However, since developers occasionally have the clock set wrong on their machines, sort overall messages by the newest date in a Received: header so the landing page isn't forever polluted by messages from the future. This also gives us determinism for commit times in most cases, as we'll used the Received: timestamp there, as well.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 7e7c989d..f08b9870 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -8,11 +8,12 @@ use strict; use warnings; # values for searching -use constant TS => 0; # timestamp +use constant DS => 0; # Date: header in Unix time use constant NUM => 1; # NNTP article number use constant BYTES => 2; # :bytes as defined in RFC 3977 use constant LINES => 3; # :lines as defined in RFC 3977 -use constant YYYYMMDD => 4; # for searching in the WWW UI +use constant TS => 4; # Received: header in Unix time +use constant YYYYMMDD => 5; # for searching in the WWW UI use Search::Xapian qw/:standard/; use PublicInbox::SearchMsg; |