diff options
author | Eric Wong <e@yhbt.net> | 2020-06-16 07:05:06 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-16 21:41:59 +0000 |
commit | 9c2bac94376c5029d258fed1ad3bf8c6b2270019 (patch) | |
tree | 1890027edfd65922ab33d34d8d62c9b515ddcd6a /lib/PublicInbox | |
parent | bdee1f6bfaa0017877e5d5284c2d5e41f67e847a (diff) | |
download | public-inbox-9c2bac94376c5029d258fed1ad3bf8c6b2270019.tar.gz |
I accidentally dropped "TEXT" handling while porting the IMAP search query parser to Parse::RecDescent. This reinstates it and adds a test to prevent future regression, and the additional test fixes a counting error for non-Xapian-enabled systems.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/IMAPsearchqp.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/IMAPsearchqp.pm b/lib/PublicInbox/IMAPsearchqp.pm index c9b442cb..4ea99ea5 100644 --- a/lib/PublicInbox/IMAPsearchqp.pm +++ b/lib/PublicInbox/IMAPsearchqp.pm @@ -16,7 +16,6 @@ my %MM = map {; $MoY[$_-1] => sprintf('%02u', $_) } (1..12); # IMAP to Xapian header search key mapping my %IH2X = ( - TEXT => '', SUBJECT => 's:', BODY => 'b:', FROM => 'f:', @@ -183,6 +182,7 @@ search_key1 : "ALL" | "RECENT" | "UNSEEN" | "NEW" | CC_string | BCC_string | SUBJECT_string + | TEXT_string | UID_set | MSN_set | sub_query @@ -239,6 +239,7 @@ TO_string : "TO" string { $q->ih2x('TO', $item{string}) } CC_string : "CC" string { $q->ih2x('CC', $item{string}) } BCC_string : "BCC" string { $q->ih2x('BCC', $item{string}) } SUBJECT_string : "SUBJECT" string { $q->ih2x('SUBJECT', $item{string}) } +TEXT_string : "TEXT" string { $q->ih2x(undef, $item{string}) } op_subq_enter : '(' { $q->subq_enter } sub_query : op_subq_enter search_key1(s) ')' { $q->subq_leave } |