Re: [Imap-protocol] Gmail search on Subject

Brandon Long <[email protected]> Wed, 30 Jul 2014 00:46:46 -0700
Newsgroups gmane.mail.imap.general
Message-ID <CABa8R6urYaKkB+7xcja6mO=iofx-hriYzsu-kgZi-DnBcTo3xg@mail.gmail.com>
Note that this is documented here:
https://support.google.com/mail/answer/78761?hl=en&ref_topic=3397501
Though, admittedly, "Substring search. All searches are assumed to be
words" isn't enough to make this behavior obvious.

Brandon


On Wed, Jul 30, 2014 at 12:43 AM, Brandon Long <[email protected]> wrote:

> In violation of the IMAP spec, Gmail's IMAP search is implemented on top
> of our search index, and is not sub-string search.  Well, that's not
> entirely true, we do implement sub-string search for "non indexed" headers,
> which admittedly is more complicated for developers to understand... but
> the performance benefit is considered to be worth it.
>
> If you search for '%' in the Gmail web interface, you'll see that it
> matches every message there as well.  That's probably unintended behavior.
>  I haven't checked recently, but last I knew, our search index didn't
> include symbols, though its possible it does special case some symbols for
> things like 'c++'.  In any case, what you're most likely seeing is that
> terms are added to the search, the '%' is parsed into nothing, so what
> remains is just the added terms (ie, in:foldername).
>
> We've debated before what the "proper" response is in this context,
> whether to have no/all results, or whether to have an error response like
> <ag> NO [SERVERBUG] when we're given a query which makes no sense to our
> implementation.  Currently, we tend to respond with "all in folder" as more
> of an accident of implementation than purpose.  In general, clients seem
> ill prepared for NO responses... or even to an OK response without an
> untagged response.
>
> Brandon
>
>
> On Tue, Jul 29, 2014 at 7:18 PM, Eduardo Chappa <[email protected]> wrote:
>
>> Dear all,
>>
>>   Apologies if this is not the right forum to post this, but it seems
>> that it is the de facto place to report bugs on Gmail. I did send this
>> privately a few weeks ago, but received not acknowledgement, so I hope this
>> time it will be considered.
>>
>>  A search using the string "%" matches all messages. For example, the
>> command
>>
>> 0000000a SEARCH SUBJECT "%"
>>
>> matches all messages in my inbox, not only those that contain the string
>> "50%", but also those that do not contain it, such as this one.
>>
>> Thank you.
>>
>> --
>> Eduardo
>> http://patches.freeiz.com/alpine/
>> _______________________________________________
>> Imap-protocol mailing list
>> [email protected]
>> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>>
>
>

_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol