The Mac Observer

MGG Answers

How Do I Reset My Spotlight Database?

Jim Tanous Jim Tanous
TMO Talk (5)

Question:

Scott writes: For some time now I’ve been trying to figure out why Spotlight won’t find messages based on a few key words within the message body of an email.

For example, say I had an email from my friend and they had put the words “Dinner at 8pm” in the message body. When I search for that exact text Spotlight finds nothing even though I know the message is there. I’ve checked and I definitely have “Mail Messages” selected in my Spotlight System Preference pane.

What can I do?

Answer:

Well, this is interesting, Scott. Just to test that this should work, I pulled up a Spotlight search for “Dinner at 8pm” and your message came to the top of the list! So it should work.

That said, it sounds like one of two things is happening: either your Mail data folder is being excluded from Spotlight, or the Spotlight cache needs to be rebuilt.

First, go to System Preferences > Spotlight > Privacy and ensure that your [home]/Library/Mail folder isn’t somehow being excluded (it could be the folder itself or anything that contains it, including [home] or your entire hard drive). If it is being excluded, remove it from the list (and know that Spotlight will now re-index and return results from it.

Check Your Spotlight Privacy Settings

If that doesn’t do it, your next step is to rebuild your Spotlight database. Onyx will do this (and while you’re at it, rebuild Mail’s Envelope Index, too), or you can do it from the command line with:

sudo mdutil -E /

Make sure you type the command exactly as it is above. You’ll be asked for your password. Please enter it, and then the process should begin. If you’re curious, this command means:

  • sudo: execute as a privileged/root user (this is why you need to type your password)
  • mdutil: the command-line utility that manages the Spotlight database
  • -E: erase the Spotlight database from whatever path I specify next
  • /: The “/” means your “main” hard drive (or the root of the current drive, which on the Mac is always going to be your current boot drive)

Hopefully that helps!

This question was originally answered on MGG 283: iPhoto, Spotlight, Swap, and More!

About MGG Answers:

Each week Dave Hamilton and John F. Braun provide some great troubleshooting advice to listeners of the Mac Geek Gab podcast. Here with MGG Answers we share some of those tips with the rest of the world!

 

Recent Headlines - Updated May 25th

Thu, 7:56 PM
News - Jonathan Ive Tells BBC He Wants to Stay at Apple
7:44 PM
News - Apple’s European Head Departs
6:01 PM
News - Apple Pulls Rogue Amoeba’s Airfoil Speakers Touch from App Store
5:33 PM
Product News - Apple Updates Aperture for External Editors, Snow Leopard
5:23 PM
Mac Geek Gab Premium Podcast - MGG 399: Five Questions from Three Scotts
5:16 PM
News - Apple & Others Settle Mobile Lawsuit With Patent Firm SimpleAir
4:44 PM
Editorial - How the Ripples in Apple’s TechSphere Will Influence Us
4:02 PM
News - Microsoft Wins Motorola Android Device Ban in Germany
3:14 PM
News - Jury: Google’s Android Doesn’t Infringe on Oracle’s Java Patents
2:41 PM
Quick Look Review - Casellet: iPhone 4S Case and Wallet Combined
1:12 PM
Deal Brothers - 13” MacBook Air 1.86 GHz Intel Core 2 Duo:  $1,099
11:18 AM
News - Sharp Teams with Foxconn for iPhone Display Production
 

The Mac Observer Reader Specials

  • Macsales Add 2nd Hard Drive or SSD to Mac mini, MacBook or MacBook Pro. 1TB of Hard Drive or SSD Capacity from $64.99! Video Guides Make it easy - OWC DataDoubler - Macsales.com
  • Mac RAM Upgrades: MacBook Pro 16GB kits $475, 8GB Kits for $119.99! iMac 16GB RAM Kits (4x 4GB) for $229.99! Mac Pro Memory 32GB Kit for $399.99, 64GB Kit for $889.99! Mac Hard Drives 2TB Seagate SATA II for $249.99! Click Here!
  • Macpokeronline.com If you're using a Mac, then you've gotta check out PokerOnAMac.com. Online casinos and poker rooms are literally giving away cash and the casino sites at Poker on a Mac do the unthinkable, they actually reward! Join today, the download is free!
  •  Looking to find online casinos for mac? We can help you find the best real money casino sites where you can play your favorite casino games including blackjack and slots.

Apple Stock Quote (AAPL)

Loading...

Hot Topics

TMO Express

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday. Find out more!

Top Deals From DealBrothers.com

Recent Features

Support The Mac Observer

We noticed you may be running AdBlock on your computer. It takes real money to run this site and to deliver the news, tips, and opinions you love to read.

If you wish to block the ads that pay for the creation of our content, we ask that you instead support TMO Directly, either with a $5 monthly recurring contribution, or a one-time donation of any amount of your choice. Thanks!

Subscribe with Paypal Donate with Paypal