Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Lion Mail and Worthless/Failing Searches

I've been on the beta/GM for a while now but cannot figure out why searching within Mail is generally broken for me.


Problem visualized below in the screenshots. I have a bunch of mail accounts, all of which work nicely. As you can see, there are some emails in view. If I type a full word into the search field, click the "Message contains "Mixpanel" suggestion (which we plainly can see is in the first message listed), I get no results at all. I've tried changing every selectable option I can and nothing will result in actually finding messages.


Searching for partials sometimes works, and choosing the auto suggestions for specific "People" seems to work but not full word searching. I'm stumped.


User uploaded file

User uploaded file

Posted on Jul 21, 2011 8:48 AM

Reply
83 replies

Aug 16, 2011 10:56 AM in response to xmetal280

I too am having this same problem -

Since Snow Leopoard, for more compound and particluarly difficult searchs I have been using HoudahSpot which claims "The sSpotlight frontend you are missing". Eventhough it seems to use Spotlight, it works - finds all the missing emails and such. I've been using it in place of Spotlight hopping that the next Lion update will reslove our collective problems with Spotlight.

BTW: I am in no way associated with the development of HoudaSpot

Aug 17, 2011 12:20 PM in response to xmetal280

I am having the same problem and it is seriously affecting my work!!!

I have tried everything.

I have done a clean install of Lion and brought everything back with time machine.

I have reindexed spotlight. I have rebuilt the mailboxes.

Houdasport above does not work for me.

in the mail search, it will find few or no emails from peole that I have 100s of emails from.

Main spotlight serach shows no email hits -- although prefences includes mail.

I have mostly pop email accounts.

I called Apple and they sent to engineering and waiting for response.

I was excited for 10.7.1 but NO help.

Please help if you have found a solution.

Thanks

Eric

Aug 17, 2011 12:40 PM in response to Eric from LA

I got tired of dealing with it. I returned my Mac Mini Server to the store and walked out with a new one. I was on day 15 and they didn't hesitate to provide a new one. The marked the other as DOA. Everything is working fine on this machine.


I had roughly 5 hours of phone time, 3 hours of traveling to & from & sitting at the Genius Bar. After all of that, it was still broken.


The straw that broke the back was updating to 10.7.1 this morning. It broke my WiFi which wasn't an issue before the update, and broke several other things. I will not be updating until 10.7.2 is released.

Aug 18, 2011 5:12 AM in response to Eric from LA

I don't know if it was hardware, software, or a combination of both. I did a clean install on my old machine. After the clean install, Spotlight & Finder search worked. Once I shutdown and restarted, the problem came back.


I have shutdown the new replacement machine several times, everything is still working.


I'm still on 10.7.0, I did not update to 10.7.1.


Another thing that I noticed was that on my old machine, Safari would consume around 500-600 MB of RAM. That's with only a few tabs open. As I'm typing this, I have 2 sessions of Safari open with 3 tabs in each. Memory usage is at 108 MB.


Perhaps the original unit was a "lemon".

Aug 24, 2011 8:25 PM in response to xmetal280

I seem to have found the solution for me.

In the main level library folder in the spotlight folder, I had an importer that was not suppose to be there.

It was related to a program that I use called Mail Tags.

The developler of that program figured it out.

He said it should not be there and must have been put there manually.

I never did that.

I am figuring that with the Lion upgrade it automatically moved around some files incorrectly.

Hope that helps some others.

I have been working on this for a week, including with Apple engineers, who never figured it out.

Good luck to all.

Happy Searching

Eric

Aug 26, 2011 12:48 PM in response to xmetal280

For me, rebuilding the Mailbox fixed it. A shame that I have to rebuild each individual mailbox.


Some data points:


- This mail account is a GMail account using IMAP

- My MBP was a "normal" upgrade install from Snow Leopard

- The system-wide Spotlight search would alway find what I was looking for -- only searching from Mail would fail to show any results (or very few results).


I would guess this is a side-effect of upgrading to Lion.


John

Aug 27, 2011 4:57 AM in response to Eric from LA

you beat me to the punch bro. i had the exact same issue and it was the developer of houdahspot who helped me with this. his email (here for reference and credit) said:


"Hi!


Please locate one of the emlx files. Then use the Terminal.app command line to run the following command on that file. You may drag and drop it from the Finder to get the correct path.


mdimport -d4 /path/to/file.emlx


This does two things:

1. It forces Spotlight to import the file

2. It prints a lot of debugging information


The first part of which is of little interest: list of available importers, …Next Spotlight says which importer it chose to whorl on the file.

Lastly you get the output from said importer. This is the metadata which Spotlight will index and which thus will be searchable.


You would expect to see:

(Info) Import: Importing type 'com.apple.mail.emlx' using 'file://localhost/System/Library/Spotlight/Mail.mdimporter/'


Meaning: Apple's importer is used to index the file. If it is another one, that is likely at fault.


In the values, look for kMDItemDisplayName. That is the name displayed by Spotlight.


Best,

Pierre Bernard

Houdah Software s.à r.l."


i would like to add that i ultimately decided that i wanted to have a clean install of lion on my new macbook air to avoid issues like this and an now i am slowly manually migrating and reinstalling my apps and settings. its a bit of a pain but if you can afford a bit of time and can be patient you may benefit in the long run.


on my upgraded macbook pro that i am still using i where i installed lion the above fix was absolutely required.

Aug 31, 2011 2:29 PM in response to xmetal280

Here's a possible solution I discovered almost by accident. My issue was that Spotlight in Lion was not finding applications, although it would find other types of file. Also the search in Lion Mail wasn't working properly. Not only that, but trying to use Spotlight's preferences to reindex the HD just brought up an error each time I tried to add it to the privacy tab. It relies on a fee app called Onyx. There is a version for Lion, just Google "Onyx for Lion".


Once you have downloaded Onyx, repair the permissions on your HD drive, either via Disk Utility or have Onyx do it for you.


When OnyX starts, it quits all apps and verifies the SMART system on your disk - I don't know what this does, but best to let it do it.


Once done, it'll give you a cautionary note, read and close it down.


In the App proper there's a tab called Maintenance. Tick the boxes next to reindex Spotlight, and there's also one called something like reindex Mail envelope. OK all of that and a few seconds later all will be fine.

Sep 13, 2011 7:50 AM in response to xmetal280

In the new Mac LION MAIL app, it's not apparent that you can search for any part of any email address the way you could before with any previous OS, for when you type partial email text in the MAIL search field, it simply gives you a drop-down list of wrong or limited suggestions and none of the suggestions are email addresses, but people's names. I don't want to search by name, I want to search by email address. (Maybe I'm the only one who does this.) If two different email addresses have the same associated name (which I have), it chooses the wrong one and searches for the wrong email address!

But there is a way:

1) Select the mailbox you want to search (if any).

2) Type in the search field:

to: any_string ["return" or "enter"]

OR

from: any_string ["return" or "enter"]

3) Your entry will change from this:

User uploaded file

to this:

User uploaded file

4) Notice that after you press "return" or "enter", your "to:" (or "from:") becomes a pull-down-menu button and the MAIL's silly choices go away. If you click the button, you get this:

User uploaded file

and you can change your choice.

3) Strangely, "to:" or "from:" MUST be ALL lowercase for this change to take place. (It will still work if "To:" and "FroM:" are all or part uppercase, but the change to a menu button will not occur.)

4) On the menu bar below the toolbar, you will see the places to search ("All…Selected mailbox…Inbox…Drafts…Sent…Flagged")

User uploaded file

Lion Mail and Worthless/Failing Searches

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.