diff options
author | Eric Wong <e@80x24.org> | 2021-03-11 02:45:32 -0800 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-11 16:35:10 -0400 |
commit | 72cbfb826cd7827c92c239d8c1e81024514e211f (patch) | |
tree | ee5532b01e246093954ad2d17a07cac925b2c032 | |
parent | cceeb7639bdd4a6a2dc0bee494c1fd5b0e0d8e70 (diff) | |
download | public-inbox-72cbfb826cd7827c92c239d8c1e81024514e211f.tar.gz |
These have been confusing to me in the past, too.
-rw-r--r-- | Documentation/public-inbox-glossary.pod | 14 | ||||
-rw-r--r-- | lib/PublicInbox/Search.pm | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/Documentation/public-inbox-glossary.pod b/Documentation/public-inbox-glossary.pod index e188e563..61e1e9f8 100644 --- a/Documentation/public-inbox-glossary.pod +++ b/Documentation/public-inbox-glossary.pod @@ -83,6 +83,20 @@ the same email into one or more virtual folders for ease-of-filtering. This is NOT tied to public-inbox names, as messages stored by lei may not be public. +=item IMAP INTERNALDATE, JMAP receivedAt, rt: search prefix + +The first valid timestamp value of Received: headers (top first). +If no Received: header exists, the Date: header is used, and the +current time if neither header(s) exist. When mirroring via +git, this is the git commit time. + +=item IMAP SENT*, JMAP sentAt, dt: and d: search prefixes + +The first valid timestamp value of the Date: header(s). +If no Date: header exists, the time from the Received: header is +used, and then the current time if neither header exists. +When mirroring via git, this is the git author time. + =head1 COPYRIGHT Copyright 2021 all contributors L<mailto:meta@public-inbox.org> diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 209969c5..c7d52daf 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -13,9 +13,9 @@ use POSIX qw(strftime); # values for searching, changing the numeric value breaks # compatibility with old indices (so don't change them it) use constant { - TS => 0, # Received: header in Unix time (IMAP INTERNALDATE) + TS => 0, # Received: in Unix time (IMAP INTERNALDATE, JMAP receivedAt) YYYYMMDD => 1, # Date: header for searching in the WWW UI - DT => 2, # Date: YYYYMMDDHHMMSS + DT => 2, # Date: YYYYMMDDHHMMSS (IMAP SENT*, JMAP sentAt) # added for public-inbox 1.6.0+ BYTES => 3, # IMAP RFC822.SIZE |