MacOS – Document Container vs Folder Name

macosspotlight

Please refer to the Mac OSX search attributes mentioned below. Any idea what's the difference between "Document Container" and "Folder Name"? Also what's the expected value of "Containing Folder Names" – a slash-delimited list of folders?

enter image description here

This question comes to me because they don't seem to work as expected. For instance, I've setup a Smart Folder using "Folder Name" like this:

enter image description here

This doesn’t give me any result at all, despite the fact that I have several pdf documents stored in a folder named "pdf". The same goes with "Document Container":

enter image description here

For "Containing Folder Names", I don't even know how to specify the value that would hit a match. Trying this one doesn't give results either:

enter image description here

Best Answer

Document Container seems to be specific to iCloud. And given that the other two reference "project", I would guess they are related to Xcode, except I have Xcode installed, and they don't appear on my system. They are probably related to another development IDE.

Try running this command in Terminal:

mdimport -A | grep '[Ff]older'

This will provide a list of metadata attributes installed on your system that contain the word "folder" somewhere in their identifier, name or description. "Folder Name" and "Containing Folder Names" should be contained in that list. All the way to the left on each line it will list an identifier, such as "com_panic_transmit_dockSendEnabled", which is the identifier for an attribute installed by Panic Software's Transmit. This should allow you to determine what application installed the attribute.

If the attribute identifier instead starts with kMDItem, then it is installed by default (and I'm wondering why I don't have it on my system).