Spotlight blows again

Dear Lazyweb,

So, Spotlight is (again) not indexing everything. I did the thing that fixed it the last time this happened (reboot, mdutil -E /, wait over night) and that seemed to only make it worse. Then I tried
find / -type f -print0 | xargs -0 -n 1 mdimport
and that seemed to help somewhat, but there's still a ton of stuff missing.

In particular: I'm looking at a mail folder; I see that one of the (very old, unselected) messages has "xmatrix" in the subject. I type "xmatrix" into a Spotlight window, and a couple of messages match, but not that one. Then I select that message in, and suddenly it shows up as a result in the Spotlight window. Repeatable with other common words.

Any idea how I fix this?

10.4.7 iMac, Intel, only one drive (internal).

Tags: , , ,

12 Responses:

  1. babbage says:

    Does it made a difference if you use mdimport -f? Does mdls even know about the file (well, a similar file which still has the same problem)?

    • jwz says:

      mdls doesn't know much about the .emlx file corresponding to a message that exhibits that symptom, and then after I select it, it knows more. I can't tell whether -f does anything different, but I have no filtering rules in prefs.

  2. rapier1 says:

    Accept that spotlight is a disaster and move on. I depsie it and only wish I could disable it without breaking other things.

  3. allartburns says:

    I have the exact opposite problem some days, I can't get spotlight to *NOT* index certain volumes.

    Anyway, here's how I reset it on the volume I did want indexed:
    in finder, exit all running apps
    $ su
    # rm -rf /Volumes/VOLUME-TO-RESET/.Spotlight-V100/
    in finder, reboot

    I've had little luck using the various md* commands. I've gone so far as to put them in crontabs and rc files and I still can't trick/make spotlight do anything but whatever it damn well pleases.

  4. otterley says:

    Any luck with mdimport -r /System/Library/Spotlight/Mail.mdimporter?

  5. reesesx says:

    I had a problem (wait, this may be related ;>) that mdimport was eating my cpu every so often, which resulted in a lot of unindexed content. This was after an upgrade to Tiger, so I don't know if this pertains to you -- if you had a non-Intel Mac previously, it could.

    Anyway, by using lsof -c mdimport, I found it working it's butt off trying to index a .DS_Store file (which are basically useless and more annoying than anything) and getting wedged, unable to recur further down the tree. Removing that .DS_Store file (and a couple others) cleared things up and reduced the CPU load.

    At this point, if I did it again, I'd either do a find and -exec rm, or use something like BlueHarvest to toast them completely. I don't depend on the Finder windows looking the same very time I open them, but again, YMMV.

  6. ask <lj user="petrock_01"> he helped write and design it...

  7. gkra says:

    You might want to give Spotless a try. I've used it on a couple faculty MacBook Pros where there's been searching stupidity in Mail, and it's fixed the problems there.

    Granted, it's mainly a GUI interface to mdutil and friends, but it certainly saved me the pain of scouring manpages and trial and error. :)

  8. Shades of animated compasses, Quicksilver is your answer. Why screw around with broken Apple code when QS is faster and more adaptive? Seriously, since QS I've not used BlotLight once, except to restart QS after downloading another amazing update. Last week I tried to merge 10.3 and 10.4 mailboxes and behold, something called elmx has haunted me ever since. As much as I love the Steve (and now Eric) show this specification-be-dammed meta-data grunge has got to be stopped, or at least documented.