If you use Apple Mail as your e-mail client, then you might find its Smart Mailbox feature useful for organizing your messages. As with the Finder’s smart folders, the smart mailboxes in Mail give you a quick way to access canned searches so you can only see messages from specific dates, from specific people, or in specific accounts. However, while useful, there may be times when smart mailboxes do not work properly, and may not show the contents you expect.
These issues can be simply a matter of delays when loading the contents of a smart mailbox, but can also be a mailbox not showing any messages, showing only a few messages, or even showing messages that do not fit the search criteria you saved.
Faulty search processes
In order to quickly search with Smart Mailboxes, OS X has to maintain an index of your drive to categorize its contents. This is done whenever you create or modify any contents of your drive, and should be a quick operation, but sometimes the system services that do this can get stuck. When this happens, searches and the display of contents that require this index may be affected. To fix this issue, you simply need to force these processes to quit, which will free up the index:
- Go to the Applications > Utilities folder.
- Open Activity Monitor.
- Select “All Processes” from the View menu.
- Search for “mds”.
- Select and quit each instance of “mds” and/or “mdserver” separately (force-quit if you have to).
After doing this, the index will be freed and your Mailbox searches should work faster now. Note that these processes may start back up again (and perhaps do so immediately), which is expected. Allow them to run and index the drive unless they continue to use high percentage of your CPU for lengths of time, and you cannot search for items on your system.

Even if they are not currently using any CPU, if your searches are not working then do attempt to quit the various mdworker and mds processes to see if this frees up your ability to search.
Faulty search index
While the mds programs are responsible for building the index, and as such can hijack it when they are not running correctly, if the index itself is having problems then this can be the root cause of both the inability to search, as well as the hangs and other problems that “mds” and “mdworker” are showing. Therefore if the problems persist after clearing these processes, then force OS X to re-index your drive:
- Go to the Privacy tab in the Spotlight system preferences.
- Go to the Finder and press Shift-Command-C to open the Computer window,
- Drag your boot drive from the Finder window to the Privacy list.
- Remove the drive from this list after a few seconds.
When done, rebuilding the index may take a few hours, during which the “mds” and “mdworker” processes may use ample CPU power on your system. This may last for a few hours, so allow the system to complete these tasks uninterrupted. When done, Smart Mailboxes and other features that use the system’s indexing services should be far faster and thorough.
This solution might be helpful in many more situations besides “Smart Mailboxes”, but the title could be better named to suggest that. 😉
Step #5 in the section “Faulty search processes” says (emphasis mine):
5. Select and quit each instance of “mds” and/or “mdserver” separately .
You meant mdworker, right?
Thanks a lot it helped.
Hi, thank you!!! Tried a few other solutions – eg delete envelope files. No luck. Tried the “delete mds” suggestion – ALL GOOD NOW!!! Much appreciate your great advice – mail search works as it used to.
Wow, force-quitting the mds processes worked for me too, just a few minutes ago. Thank you. It’s hard to believe that something so simple did the trick.
You’re a genius! Thanks.