As a workaround, would it be reasonable to pull "foo" and "body:foo" queries in parallel and return the unique messages?
Enabling and using server side search should be a config flag. Don't just hit both and thrash everyone and everything. That'll burn CPU and worse I/O capacity for no good reason.
BTW, if you want fast imap server side search.. look at cyrus with daily runs of the cyrus squatter (full text indexing) utility. Cyrus is just a bit much to set up and maintain. The server side search with squatter databases built is wicked fast even on huge mailboxes. When I last ran Cyrus I was regularly opening/searching/closing mailboxes with 30,000 messages in them.
List info: http://lists.roundcube.net/dev/