Use better search library
Feature Summary
Search intelligence should approximate the quality of competing email clients.
How would you like it to work
When I search "#FooBarBaz" in FastMail or FairEmail or emClient, I see two results: One with "#FooBarBaz" as the FROM, and one with "#FooBarBaz" included in the subject line. When I search "#FooBarBaz" in Geary, I see zero results.
When I search "foo.bar1234@fastmail.com" in FastMail or FairEmail or emClient, I see the dozen or so emails that were sent to that exact alias. When I search "foo.bar1234@fastmail.com" in Geary, I see many emails that contain "fastmail" in any field or the body, and yet the emails sent to that address are absent from the search results.
These are two simple anecdotes which demonstrate that Geary's search functionality often behaves in a way that could fairly be described as "unintuitive", "illogical", "untenable", and "buggy". There is no need to re-invent the wheel - existing libraries like Xapian and Clucene can be leveraged.