Hi Jason,
As you know, zimbra has soap api "SearchRequest" for searching mails.
To get detail info about that, you better check out soap.txt, which is in ZimbraServer/docs folder of source code repo.
And also you better see
Zimbra Web Client Search Tips - Zimbra :: Wiki .
This give you some instruction about how to write query in "SearchRequest".
I hope it will guide you through.