Jump to content

Finding files with multiple kMDItemKeywords


Recommended Posts

macOS: 10.14.6 (18G87)

Alfred: 4.0.3 b1092

 

I use `xattr -w com.apple.metadata:kMDItemKeywords` to add keywords to certain apps/files/folders to make searching easier. This works, but it seems Alfred has trouble when there are multiple keywords assigned. Take the example below, where I have tagged the "BackupLoupe" app with some keywords:

 

image.png.6863c49dddfb04d3d720aa3e1596076e.png

 

The keywords are timemachine, machine and time.

Specifying any SINGLE keyword works, e.g.

image.png.275dc54e469b63a40496c43d9236557b.png

 

Even this works, strangely (separating keywords by comma, space):

image.png.3c33a6bc75cc6a18022cd209290fffcb.png

 

But not this (space only):

image.png.d449b95db8c696defdf6c188df1d76b0.png

 

Or this (comma only)

image.png.afa894dac79cec124e80858b94ca57c0.png

 

In "regular Spotlight" it works fine:

image.png.41ecad76a86768057c8c47a3cf8f1507.png

 

I think this is a bug in how Alfred processes multiple keyword metadata.

 

 

Edited by luckman212
Link to comment

Alfred's built in search works as designed (less noise), so the behaviour you are seeing is correct.

 

You have control over file search behaviour if you use a file filter in a workflow. For example, to arbitrarily search keywords, you would use something similar to this:

Screenshot 2019-08-21 at 13.52.48.png

You can add in other fields if you want to search by e.g. display name also.

 

Here is more info on using file filters:

https://www.alfredapp.com/help/workflows/inputs/file-filter/

 

Cheers,

Andrew

Link to comment
  • Andrew changed the title to Finding files with multiple kMDItemKeywords

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...