I dont't know the capabilities of gmail, but IMAP supports server side search which is quite fast if the Solr full text search plugin for dovecot is used (wiki.dovecot.org/Plugins/FTS/Solr). For debian "dovecot-solr" can be used.
For Android K9-Mail does not really support server side search, Aquamail does and for other mail clients I don't know.
Am 1. Dezember 2019 22:18:37 MEZ schrieb John Gateley via dovecot <dovecot@dovecot.org>:Hello, I am using dovecot as an imap server, mail is stored in mail directories. Configuration is below. One mail directory has about 14 Gb of mail in the inbox and .Sent directories. Searching from an Android phone with gmail is slow or doesn't work (it times out). Is there a configuration for Dovecot that can improve this? A better e-mail client for Android? Thanks, John