diff options
author | Eric Wong <e@yhbt.net> | 2020-06-10 07:04:52 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-13 07:55:45 +0000 |
commit | 601658e48f0e28ca178ef5c4d7eed0e50ef42167 (patch) | |
tree | e78b5ee412bfb4982cfb08316071f182cb5a71ea /lib/PublicInbox/Search.pm | |
parent | 77fe488ce5432a49ea8499605e0d8e155834575f (diff) | |
download | public-inbox-601658e48f0e28ca178ef5c4d7eed0e50ef42167.tar.gz |
Searching for messages smaller than a certain size is allowed by offlineimap(1), mbsync(1), and possibly other tools. Maybe public-inbox-watch will support it, too. I don't see a reason to expose searching by size via WWW search right now (but maybe in the future, I could be convinced to). Note: we only store the byte-size of the message in git, this is typically LF-only and we won't have the correct size after CRLF conversion for NNTP or IMAP.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index cb669e87..f2d3b92d 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -5,12 +5,16 @@ # Read-only search interface for use by the web and NNTP interfaces package PublicInbox::Search; use strict; -use warnings; # values for searching -use constant TS => 0; # Received: header in Unix time -use constant YYYYMMDD => 1; # Date: header for searching in the WWW UI -use constant DT => 2; # Date: YYYYMMDDHHMMSS +use constant { + TS => 0, # Received: header in Unix time (IMAP INTERNALDATE) + YYYYMMDD => 1, # Date: header for searching in the WWW UI + DT => 2, # Date: YYYYMMDDHHMMSS + BYTES => 3, # IMAP RFC822.SIZE + # TODO + # REPLYCNT => 4, # IMAP ANSWERED +}; use PublicInbox::Smsg; use PublicInbox::Over; |