Apple Mail search only finding some emails
Using the search function to search through specific folders only turns up some of the emails that fit the search query. I am frequently searching for a person/email address, so this is not just a problem with the keywords I am using or the full-text indexing.
Some nteresting observations:
- If I manually scroll down and open an email that would fit my search query that did not appear in my search results before, it will not suddenly appear in them. So this is probably an indexing issue.
- I notice this problem particularly badly occurring in nested folders - however, normal folders (like "sent") are still affected
- If I "search all mailboxes", many of the emails I was looking for do pop up, but only because Mail finds them in "Archive" or "Important"
Things I've tried to fix this problem:
- Use "rebuild mailbox": nothing happens upon button press
- Delete the Envelope files in the `~/Library/Mail/V9/MailData` folder: index is rebuilt but mail search is still not working
- SQL vacuum the envelope file: same thing happens
- Rebuild Spotlight index: that often changes the emails that are found but it doesn't fix the problem
- Update macOS
All to no avail.