2

My spotlight searching hasn't worked for quite some time and I've tried everything I could find on Google. I can't search for anything on my MacBook.. literally nothing shows up. I'll list the things I've tried and specs:

Early 2011 2.2Ghz MBP 4GB RAM OSX 10.9.4

  • disble/enable spotlight via terminal
  • toggled hidden files and looked for ".metadataneverindex" couldn't find it
  • repeated the previous, using terminal commands.. file not found
  • put everything in the preferences/privacy "prevent indexing" then removed
  • sudo mdutil -i on /

  • sudo mdutil -E /
  • sudo mdutil -a -i on
  • zapping the PRAM

Based on what Trane Francks said in the comment below.. I built the DB and ran the line again. The second line is what it returned: locate .metadata_never_index /.metadata_never_index

I found .metadata_never_index as a hidden file in my root, so I deleted it and tried reindexing.. but its giving the "Indexing and searching are disabled" message still.

I've tried many of things and every time.. I get "indexing and searching disabled."

I just wanna be able to search my mac again!! Please help! Thanks.

  • 1
    Just to confirm, the filename is actually '.metadata_never_index'. When I run 'locate .metadata_never_index' in Terminal, it finds the file in my recovery partition. – Trane Francks Sep 23 '14 at 7:55
  • I tried that and terminal returns: "WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist" – Justin Oct 1 '14 at 0:31
  • @TraneFrancks I updated my question after I updated the database and tried it again. Can I do "rm /.metadata_never_index" to delete it? – Justin Oct 1 '14 at 0:41
  • 1
    If you want to delete a system file, you'll need to use sudo, e.g., sudo rm /.metadata_never_index. – Trane Francks Oct 1 '14 at 1:13
  • I wonder if this is much different than apple.stackexchange.com/questions/24401/… – bmike Mar 16 '16 at 13:35
5

FINALLY!! I got it working again!

Heres what I did:

In terminal I ran:

locate .metadata_never_index

No database existed, so it prompted me to run:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

It ran for a few seconds and I retried the locate command.. it found it in my root. I deleted it and tried turning on spotlight again, but still got the "indexing and searching disabled."

I checked the permissions of my SSD and my account wasn't even listed. I added myself to read/write. Then ran:

sudo mdutil -i on /

terminal returned "Indexing enabled."

Lastly.. I went to system preferences>spotlight>privacy.. dragged my SSD then removed it to reindex. 40 minutes later.. everything is back to normal! It had been a year since spotlight worked on my MBP. Ohhh the struggles I faced trying to find emails/files.

Thanks for the tips and suggestions everyone and Google!

1

Re-index an entire drive In the Terminal, type sudo mdutil -E / and hit return. You may have to enter your password. The existing Spotlight index will be deleted, and Spotlight will start creating a new index in the background. You can re-index other hard drives by changing the command to include their name, like sudo mdutil -E /Volumes/OtherHardDrive.

sudo mdutil -i off /
sudo rm -rf /.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /

I'm order, these accomplish:

  1. turn indexing off
  2. delete Spotlight folder
  3. turn indexing on
  4. rebuild
  • It gives the "indexing and searching disabled." message when I try that – Justin Oct 1 '14 at 0:30
0

I search for it in the net for months... and it was so easy!!

System preferences -spotilight -Privacy -if your harddisk is in the list mark it and then press (-)

When your harddisk is removed from "prevent searching this locations", you spotilight will scan your files for around 2 hours and voila!

:)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .