Spotlight, UserFilesOnly, kMDItemSupportFileType, and MDSystemFile

Recently, VMWare Fusion stopped appearing in Spotlight results. Other queries return expected results, and the spotlight index info for Fusion appears OK at first glance via:

mdls "/Applications/VMWare"

What’s going on, then? To get a different perspective, I tried a Spotlight search in Finder:

before… and then saved the results, and examined the resulting XML file¬†with Property List Editor:

query plist editorIt seems there are additional filters in this search that aren’t accounted for in the UI (which is typical Apple, but I digress) such as FinderFilesOnly and UserFilesOnly. I decided to try running the raw query without those extra filters using¬†mdfind, and sure enough:

$ mdfind '(** = "vmware fusion*"cdw) && ('

A closer look at the mdls output for VMWare reveals the culprit:

$ mdls -name kMDItemSupportFileType /Applications/VMware\
kMDItemSupportFileType = (

Kill it with overwriting but not deleting:

$ sudo xattr -w "" /Applications/VMware\
$ mdls -name kMDItemSupportFileType /Applications/VMware\
kMDItemSupportFileType = (null)

… and now everything’s OK again:

About dre

I like all kinds of food.
This entry was posted in OS X. Bookmark the permalink.

Leave a Reply