Apple Event: May 7th at 7 am PT

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

Mail+Spotlight Search Not Working in Lion

I've been dealing with this problem for over a month and have not been able to fix it. Search works fine in Lion on several computers, but on my laptop it still won't do a complete search. It will only pull up emails from people in my contacts list..... no subject key word searches or people outside my contacts searches..... very frustrating! The searches also don't work in Spotlight, so I can't use spotlight as a backup.


I've tried rebuilding my mailbox.... deleting and recreating the account.... tossing out the Envelope Index folders in the Mail library... Deleting and re installing my search window, etc...... I see lot's of other people with the same issue. It's frustrating when your running your business on your computer and have to deal with a flaw in a new OS..... it was working fine in Leopard..... whats up APPLE? Please help!


Other Info:

Macbook Pro 2008 Version with 2.5 Ghz Intel Core 2 Duo

Running 10.7.4


Posted on Jun 26, 2012 3:12 PM

Reply
39 replies

Jun 27, 2012 10:31 AM in response to Glenn Leblanc

Glenn,


I downloaded and installed the update after repairing the drive.... spotlight seems to have limited functionality.... no contacts search or mail....etc. I have everything checked in the spotlight preferences so not sure what's going on there. Still limited search in mail as well.... basically nothings changed.


Any ideas about what I can do now? Thanks for your help.

Jun 27, 2012 10:39 AM in response to bill96744

Since you have installed the ComboUpdate, have you tried to reindex Spotlight through the preferences? You couldn't get it to work before. If you can't get it to reindex, then it won't return searches.


Some other thoughts:

What is the format on your hard drive?

Are you using any disk encription or filevault?

Any other conditions other than normal (sharing drive, etc.?

Jun 27, 2012 11:52 AM in response to Glenn Leblanc

Glenn,


Nothing unusual... standard drive/format that came with the laptop.... no encription or filevault as far as I know?


I did try to reindex Spotlight via the preferences proceedure with no luck. The only searches it performs are the following:


Now it will search the drive but it leaves out contacts, messages and events..... and of course Mail is still not searching properly... only people searches that are in my contacts will appear, no subject, notes, etc.....

Jun 27, 2012 5:05 PM in response to bill96744

Computer age doesn't matter as long as it meets the specs for Lion. I'm just stumped on why we can Spotlight to reindex. Something has happened that is beyond my knowledge. It might be simple, but I just don't know what it is.


If you are concerned about the hard drive, open disk utility and verify the disk again. If it returns no problems, then that's probably not it.

Since your hard drive needed repair last time you checked, if it needs repairs again, then it's probably failing. I would replace it.


The article I gave you on using terminal to turn off spotlight and back on should have done it. That's why I thought there was a system problem. You might check the drive and then give that a shot again if the drive test OK.


If you can't get spotlight to reindex, then you will never get the search to work.


If you use TM just to do a complete restore, you will likly bring the problem back to the system.


Only other thing I can suggest is to download the latest Lion from the App Store and create a bootable flash drive installer ( http://osxdaily.com/2011/07/08/make-a-bootable-mac-os-x-10-7-lion-installer-from -a-usb-flash-drive/ ) which will make it a bit easier.

Then, boot from the flash drive, then erase and reformat the disk to Mac OSX Extended Journaled, and reinstall Lion. Then when you boot up for the first time, use setup assistant to migrate your files and apps. With Setup Assistant, you can exclude the User Library files to not bring any problems back to the system.

Aug 22, 2012 10:11 PM in response to Glenn Leblanc

Hey there. I have absolutely no help to offer except to say that I've been having *exactly* the same problem. I'm not a neophyte in the least, and I've tried these pretty robust solutions on my own. I've had no luck getting successful mail searches on messages that I can confirm are indeed in the mail application. They're there. I can see the text I'm searching for yet they do not appear in results, even after much meddling. I've noticed this for some of my clients too. I'm beginning to wonder if upgrading from a previous OS does something to a support file associated with Mail that is below our radar. Perhaps I'll create a new user, set up the accounts as new in that user's Mail app and see what results that gives me. Does that sound reasonable to you, Glenn? Isolating the problem from any upgrade incompatibilty or corruption by usinga fresh user? More to follow...

Aug 23, 2012 5:18 AM in response to phospholipid77

Yes, create a new user and test. If it works there, then there is a problem in your user account. That will help to confirm where the problem lies. There are several threads on this with various tips. I have already given any ideas on fixing this in serveral of them. Once you have tried the new user account, you might try posting a new question stating everything you have done and see if anyone can post some fresh ideas.

Sep 6, 2012 7:37 PM in response to Glenn Leblanc

I can confirm that the user side fix worked for me. I created new user sides and set up the IMAP accounts as new in those user sides. In one case I set it up completely new. In another case I imported the ~/Library/Mail and ~/Library/Mail Downloads folders into the appropriate spot, and then I set up the accounts (I did NOT move the preference file over, that has all the account settings; the app opened with the accounts listed, but I deleted them and set up the accounts themselves as new).


In both cases, I was able to have full indexing of previous old messages, even if they weren't in my address book or previously sent lists.


My early speculation is that there is some kind of glitch with indexing mail accounts that have messages that are 1) not in the address book and/or recipient list and 2) that were indexed in the app before an upgrade to 10.7 or .8.


That seems reasonable to say based on my results.

Sep 7, 2012 5:55 AM in response to phospholipid77

Upgrading the OS shouldn't affect the user account except for leaving old files behind which usually cause no damage, but you never know. It's hard to say which file in your user account was corrupt, but now you know one was. It could be the one with the account settings, but it could also be another preference file in you home library folder not within the Mail folder. Other folders such as the ApplicationState Folder in the Home Library can cause problems also.


Once you know the problem is in your user account, a quick shotgun method to at least eliminate the main preferences to you system and application settings would be to open the Home Library folder and move the entire contents of the Preferences folder to the trash and restart the computer. If that doesn't fix the problem, you can reverse the process and then look for the problems within other folders such as the Home Library/ Mail folder.

Sep 8, 2012 6:31 AM in response to Glenn Leblanc


Upgrading the OS shouldn't affect the user account except for leaving old files behind which usually cause no damage, but you never know. It's hard to say which file in your user account was corrupt, but now you know one was.


Exactly. And this isn't unheard of. I remember that when I upgraded from 4 to 5, or more often from 3 to 5, that sometimes, not always, there were problems with little things like this. The best I can come up with is that certain kinds of files - databases, preferences, indexes, etc. - become vulnerable. Why sometimes? Why for some andnot others? Why for some apps and not all? Eh... who knows? The interesting thing in this case is that for both of my user sides that weren't indexing and searching old emails inside of the Mail app, setting up new user accounts, bringing in the old "On My Mac" mail boxes, and re-establishing the IMAP accounts via preferences and re-syncing (NOT by importing the previous prefs file) worked. Frankly, in my case, it was just easier to do that than the method you suggested because, I figured, I would take the opportunity to just do a wipe and reinstall of the OS. I was having serious SERIOUS performance issues after upgrading to Lion from SL. A clean install and reinstalling all my apps has cleared that up nicely. So, the current issue plus the fix on performance even moreso makes me to wonder about the wisdom upgrading to Lion or ML. There was a time when I used to say always clean install. Then I began to feel comfortable with the upgrade process. Looks like I'm back to the old way; and that's fine by me.

Sep 9, 2012 6:18 AM in response to phospholipid77

There could be odd files such as fonts that can cause problems. You would not think to relate them to a particular problem and would not be looking in the correct folders for a fix. If the corrupt files are in the user library, then a new user would fix that. So, reinstalling the system would not particularly fix the issue unless you start from scratch with your user account also by reinstalling applications also and recreate settings manually.

In your case, you stated that the new user fixed your problem. If you just eliminated everything within the Home Library of that account and restarted the computer, it would have been about the same as creating a new user and starting from scratch as a new user.


There is also the possiblility of certain files getting left behind in the system library like fonts or files from applications not uninstalled correctly. I had this issue with NAV files that got left behind even though I uninstalled the application before ungrading to SL. After troubleshooting and removing those files manually (which the uninstaller didn't remove), it cleared my problem. I've always installed over the existing system and can't remember back if I ever wiped a drive to do a clean install of a system. I have reinstalled combo updates over the existing system after issues with doing an update from software update. But that was only twice.


So if you have issues that you can't find the answer to or if it isn't specific to a user account, sometimes it's really best to just start with a fresh copy of the OS and just take the time to rebuild everything from scratch. Then you can just copy your documents back to your user account.

In reality because of the time it takes to wipe a drive and reinstall everything from scratch, I would just continue with the upgrade process until major problems occur. Sometimes it's just easier to fix minor glitches.

Best advice anyone here will give is before installing and updates or upgrades to the system is to make sure your computer is in good shape before. Run permissions repairs, verify the hard drive is not failing, remove connected devices, check for incompatible software, etc... Also when removing software, always research and remove all files associated with that software.

Sep 16, 2012 10:30 PM in response to bill96744

Hi all, just to mention that file permissions may interfere with indexing. Can't remember right now details how I fixed this some while ago (not with lion), but it was related to file owner and group. So must have done a brute force chown -R and chgrp -R. Isn't there some utility in the hidden restore partition of Lion that helps fix all this? I'm talking about user permission, not the usual disk utility repair (more useful to fix the system). I suspect it could also be related to ACL and/or extended attributes, that can be fixed with chown -N and xattr -c. Hope these leads can help.

Mail+Spotlight Search Not Working in Lion

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