When Spotlight stops spotting files

I have become a Spotlight addict ever since my friend Dylan recommended that I use it. So it was with some dismay that I fired it up on my MacBook and suddenly it could not find some of my key applications.
I tried searching the interwebs and all I could come up with was several recommendations that I try removing and re-adding folders from Spotlight. None of that seemed to work for me.

In the end I decided to do a full reindex of Spotlight, which can take quite a while. In the case of my MacBook with a 320G drive (197G in use) it takes nearly an hour. The machine is perfectly useable during that time, except that you can't use Spotlight until it's complete. 

If you need to do the reindex simple open a terminal window and plug in the following command:

sudo mdutil -E /

Once that kicks off (you'll need the administrator's password) you can close the terminal window and continue working, though the CPU on my MacBook was pretty busy for a while.

When it finally did come back Spotlight could again find everything. If you get the situation where Spotlight can't find some files try these suggestions first. If that fails then ensuring you have all of your Spotlight folders properly selected (Preferences / Spotlight) and then performing the reindex above will likely fix the problem.

You can also see the progress of the indexing by placing your mouse over the Spotlight icon to get a reading of the percent complete on the indexing. Thanks to MacWorld for highlighting that little gem.


Chris Howard said...

Dave! You've turned into a fully fledged Mac user!

This piece should have been a rant. First that Spotlight screwed up, second that it required a very geekish solution that you made sound "simple" and thus easy for anyone.

Instead, like so many Mac users, you are quite accepting of it all and don't seem to see the bigger issue. :)

That's cool though, we all went thru that phase too. Though I'm sure you've met a few or so Mac users who never get past that blinkeredness. :)

Macs are better, but we shouldn't overlook their shortcomings.

David Alison said...

@Chris: Ha! Yeah, there are lots of little thing that make the Mac imperfect. This particular one was an interesting one for me because I've come to depend so heavily on Spotlight.

I think all technology is going to have issues at some level and with the speed everything moves in the personal computing space it's inevitable that some features will not be as stable or flexible as others.

I will be the first to admit that I'm still in the fawning stages because I've found so much to like. As my Mac stops becoming the new toy and starts to settle in as my everyday work machine I'm sure my attitude will change a bit.

Then again, that's why I'm doing this blog; people that are thinking about switching to Mac will see all the stages as they evolve over time. I'm just nerdy enough to write the stuff down ;-)

Chris Howard said...

lol. Yeah, and I hope you didn't feel I was picking on you - I was just having a chuckle about you previously died in the wool Windows guy getting to this stage of your Mac affair. :) Like when you can't see you new girlfriend's faults.

One day though, you do realise the Mac is "just a computer", which is a bit of a letdown. However, it only lasts until the next time you have to use Windows for a period of time.

Spotlight is an interesting one. I was going to say a hardly ever use it - but then I thought about it.Because it becomes so natural you end thinking you don't use it. Until of course it's not working then you realise how much you do use it.

Charles said...

This has happened to me several times but it's always been transitory, lasting no more then 15 minutes. BTW, if you're looking for a more memorable way to reindex, download one of the freeware system utilities like Onyx.

Shad said...

Love the blog, been reading it since day...4? :)

Have you tried Quicksilver? I'm sure I've seen it mentioned in the comments, but I don't even touch spotlight now.

RG-6 said...

Nice work on the blog - I have enjoyed reading about your transition to the Mac.

Spotlight is incredible. I use it constantly.

Quicklook is another amazing feature that a lot of people don't use (at least from my personal interactions with other Mac users). I think QL is right up at the top of best new features in Leopard.

David Alison said...

@Chris: No way man, not offended at all. I've learned that if you blog about stuff you need pretty thick skin - especially if you talk about the virtues of operating systems.

@Charles: It wasn't transitory for me unfortunately. I noticed the other night but was busy with other tasks so nearly a day elapsed while it was not working.

@Shad: I've had many people tell me that I should look at Quicksilver but I've been so happy with Spotlight I haven't really even tried it yet. Glad you're enjoying the blog!

@RG-6: You know, you are absolutely correct. Quicklook is amazing and I haven't even mentioned it! Next post... thanks!

Tom said...

For future reference, adding your hard drive into the spotlight exclusion list is supposed to have the same effect as the terminal command you ran. I've used that over trying to remember the terminal command in the past to reindex things.

I think I've only had a real need to do it 3 times now, and thats dating back to OS 10.4.0 and nearly 3 years now. Typically I notice it when my Mail smart folders stop being smart, since that ties into Spotlight.

Also, I too highly recommend Quicksilver. While Spotlight is good for finding files, and under 10.5 is an okay application launcher, Quicksilver goes one step further in allowing interactions to happen with the files or apps you search for. I can for example enter the following key sequence, assuming I have you in my address book:

1. Ctrl-Space to activate Quicksilver
2. Type in the name of an image in my pictures folder
3. Hit tab, type in E for e-mail
4. Hit tab again, type in Dav and enter.

This will launch Mail and start a new e-mail with the image attached and "David Alison" in the To: field.

David Alison said...

@Tom: I've had so many people recommend Quicksilver I can't even count it. I guess I should take a look at it!

Paul said...

Hi David

Quick recommendation of a small piece of software that I recently discovered.

This is superb if you spend any time watching videos on websites.

For example, here in the UK we can watch full TV programs on the BBC (I think you guys can do it on the ABC site?). Whereas VLC and Quicktime both disable automatic screen-dimming & screensaver, I found that flash videos didn't. Now I just click once on the icon, and my Mac won't disrupt any video I'm watching. Apple + click allows me to specify the time. Small thing, but very useful!

David Alison said...

@Paul: That's funny - when I first read your comment I saw the URL and immediately jumped over to check it out without reading how you use it. When I saw the web page for it I thought "And the point of this is...?", then read the rest of your comment and realized that is actually a pretty cool use for it. Nice find!

I am a lover of children's literature said...

When it comes to Quicksilver, one program I could never do without, there are lots of YouTube instruction videos online, so please check them out.

As well, a quick Google search for Quicksilver instruction videos will leave you wondering why you never tried it earlier. It's a totally unique Mac experience and one that you won't find equivalents on either Windows or Linux.


PS. I installed and enjoyed your Dashboard widget; thanks!

David Alison said...

Glad you liked the widget! My second one took all of about 5 minutes to do - grabbing one of my favorite on-line comic strips and placing it in a Dashboard widget. So easy.