Spotlight Misses Files
Posted April 6th, 2006 @ 01:33pm by Erik J. Barzeski
I'm not sure why, but Spotlight misses files all the time. Today I tried to search for a file called "HoH.mov" by typing in "hoh.mov" into a "Find" window in the Finder.
Two copies at "HoH.mov" from my backup disk appeared, but none from my startup disk. I looked on my startup disk and, yes, the files were there.
I'm not sure how to fix this (I assume I can delete the Spotlight index or something), but until Spotlight can actually find files that exist, it will remain virtually useless for me.
P.S. Every single thing in the Spotlight prefs is checked and enabled.
Posted 06 Apr 2006 at 3:57pm #
I am not completely sure if I amseeing the same thing because of the way spotlight truncates its response to the most common finds; that is, it may be indexed, but the report is less than complete. It also seems to be the case once I have physically found the file, Spotlight is more likely to find it too.
I don't know the exact finder action that gets a file to be indexed as it is created; it seems that I see this most with downloaded files not making it to my downloads folder, but to my documents folder due to some method of saving via a browser seems to be redirecting a file.
Posted 07 Apr 2006 at 1:53am #
Erase Spotlight index:
mdutil -E /Volumes/Macintosh\ HD
It should start rebuilding automatically.
Posted 07 Apr 2006 at 3:35am #
1. What folder is the HoH.mov in?
2. When you run
mdls /path/to/HoH.mov
what do you see?
If you see kMDItemCodecs, kMDItemDurationSeconds, etc., that means Spotlight has indexed the file. If all you see is kMDItemFS*, then it has not.
3. To rebuild your startup disk's index, you can "sudo mdutil -E /" .
Posted 07 Apr 2006 at 9:53am #
[9:51am iacas@Hamlet:~] % mdls ~/Movies/Miscellaneous/HoH.mov
/Users/iacas/Movies/Miscellaneous/HoH.mov ---
kMDItemAttributeChangeDate = 2006-02-28 10:21:16 -0500
kMDItemFSContentChangeDate = 2005-09-23 04:53:28 -0400
kMDItemFSCreationDate = 2005-09-23 04:53:12 -0400
kMDItemFSCreatorCode = 0
kMDItemFSFinderFlags = 0
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSLabel = 0
kMDItemFSName = "HoH.mov"
kMDItemFSNodeCount = 0
kMDItemFSOwnerGroupID = 80
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 334300142
kMDItemFSTypeCode = 0
kMDItemID = 1640129
kMDItemLastUsedDate = 2005-09-23 03:53:28 -0400
kMDItemUsedDates = (2005-09-23 03:53:28 -0400)
After opening the movie, Spotlight actually finds the file and it appears properly in the search results (with a lot more information). But whoopty doo.
And since you must be an administrative user to rebuild the index, I'll worry about rebuilding the index later.