Using a keyword that contains a space in a Spotlight search

findersearchspotlight

I'd like to run a Spotlight search to find all email messages that contain a specific attachment:

attachment names:screenshot

I tried the keyword "attachment names" in the Spotlight search window and in Finder's search field, but it returns no results. I suspect that this may be due to the space in the keyword "attachment names".

When I define the search criteria in Finder and pick Attachment names from the menu, it does return the correct results (see screenshot #2, I cut out the actual results).

Spotlight serach

Note: I tried leaving out the space, but that did not work. However, for another keyword, "Color space", using "colorspace" does work…

Note 2: Attachments are only one example, I'm looking for a solution that works for any keyword that contains of more than one word.

Best Answer

This is not an answer. I wrote this just inform: In my experience, spotlight can get the right result, even if it contains spaces in the file name. Please refer to the screenshot below

enter image description here

First, Make Sure enable "Mail & Message" option in spotlight preference.

PS:Usually you can search email in build-in Apple mail search or using Smart mailbox. Of course, you can also use the spotlight to search for email.