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.