I tried this simple trick offered by justcallmekath before doing the more complex re-indexing suggested by Glenn and others (I have a new macbook air and everything transferred from my old macbook pro via timemachine perfectly, but like others, the search function in Macmail was not working, though it looked like all of my old emails were actually there; so frustrating!). Anyway, this worked immediately--thank you so much for the tip. Also, I should note this was a problem using Maverick, the new operating system (10.9), so the bug continues.... So glad for this easy fix!
imac_07 's suggestion worked for me!
thought i'd give it a whirl before reindexing (which I also know to work from past experience).
this saved alot of time ...thankyou!
MacBook 15" : mid 2009
Vanilla Lion build, software updates then applied, user migrated via migration manager from Snow Leopard
mail search DOA (initially)
SOLUTION Below (but read the following first):
I'm still using Leopard till the bugs in Lion are fixed, but my solution may work for Lion & other OS users.
1. Remove Mail's Search Field (by clicking in the field, dragging it & release it), or Right click the Menu/Customize Toolbar/Drag the Search field to remove it.
2. (Not sure if this was necessary but I did): Close Mail.
3. Reopen Mail, Right click the Mail's Menu Bar (or in between the icons)/Choose Customize Toolbar/Drag the Search field from the list to its previous location/a location of your choice.
4. Restart Mail (may not be necessary), ... Wallah! My search engine came back.And that's after Months of doing without it.
Hope it works for you too.
I have tried each of these fixes and still cannot search my mail. I tried the reindexing, the rebuilding, and the envelop files.
I took my new Macbook Pro Retina 13 to Apple and asked them about it. They said it is a 'known issue' and Apple are 'working on it.'
However, since then there have been two updates to the system and no fix. I cannot file my mail as I cannot search it.
About to install Outlook because this is a nightmare and Apple doesn't seem to care one bit about it.
I had similar problems - when I used the search bar the messages I was after appeared in the suggested searches that drop down underneath, but when I clicked on the message in question... nothing.
I tried rebuilding the mailbox, and removing the envelope index files as suggested in the early replies to this thread.
What finally worked after trying this was to use Spotlight instead. This found the messages straight away, which turned out to be in my Junk folder.
I have deleted (and rebuilt) the envelope files, search still does not work.
In System preferences, I have added (and removed) my boot drive (an SSD), without problems. However, I keep my user files on a separate HD. When I try to add that to be excluded from searching in the privacy pane, it says I can't do it because of an unknown error. Could it be that spotlight isn't searching that whole (1 TB) disk? How do I get it to that?
It's been many years since I've used Lion and since your user files are on a separate disk, I'd rather let someone more familiar comment. But since you are getting spotlight errors trying to exclude a disk, then that could point toward the problem. If Spotlight isn't working properly, it would affect any type of search on the computer. Your spotlight preferences could be corrupt also.
You might try simple things first. Use Disk Utility to fix disk permissions, verify disk with Disk Utility, rebuild user permissions (google how to do that for Lion), and restart the computer.
Also, I recommended ONYX earlier. You could do most of the above with that program.
Remember to backup all you data before doing anything.
I suggest you start a new question. Put your info and setup and state your exact problem. People who are still more active on these boards are more likely to be able to help you.
Be sure to download the latest ONYX for Yosemite.
Remember to backup you data before running it. I did run it on mine since downloading Yosemite with no negative affects.
Select all tasks you want to run including permission repairs for disk and user ACLs, clean caches, etc. You can select most from the Automation tab to do all at one time.