xser

Q: How do I stop spotlight from searching mail *attachments*

I regularly have to attach one file to 10+ emails. Spotlight seems to index every single attachment. So when I search for my copy of that file (e.g., the one in "Documents") to make some edits, Spotlight returns all of the attached files (which live somewhere in the Mail ecosystem). So it takes a long time to find the right copy of the many different files.

 

Is there a way to tell Spotlight to stop searching for mail attachments.

 

To clarify, I want to be able to search in the body, to/from, subject, etc. fields of mail. I just don't want to search for attachments.

 

What I've tried so far:

  1. put Mail Downloads folder in Spotlight privacy list (didn't work)
  2. put Library > Mail in Spotlight privacy list (prevented ALL searches in mail; not desirable)

 

I need a middle ground between 1 and 2.

 

Other info:

OS X 10.11.6

MacBook Air, OS X El Capitan (10.11.6), Finder, Spotlight, Mail

Posted on Aug 3, 2016 10:21 AM

Close

Q: How do I stop spotlight from searching mail *attachments*

  • All replies
  • Helpful answers

  • by leroydouglas,

    leroydouglas leroydouglas Aug 3, 2016 10:57 AM in response to xser
    Level 7 (22,866 points)
    Notebooks
    Aug 3, 2016 10:57 AM in response to xser

    It seems rearranging spotlight search results has been deprecated in El Capitan.

     

    However you may be able to do a "smarter search"

     

    [To force Spotlight to search only for a particular type of result that matches your search term, such as images, type kind: and then the type of file you’re looking for. For example, to search only for audio files matching the word bieber, I’d type the following:

    kind:music bieber

     

    To search for office files matching the word report, type the following:

    kind:documents report

    Other options you can try, and which should be self-explanatory, include kind:word (also try excel and powerpoint), kind:pages (also try numbers and keynote), kind:spreadsheet, kind:presentation, kind:app, kind:bookmark (searches browser history too), kind:contact, kind:chat, kind:event (also searches reminders), kind:folder, kind:movies, kind:images, kind:fonts and kind:pdf. You might also try author: and date: – author:john smith will return documents and emails created by that person, for example, while date:1/4/15 will return only items created or received on 1st April 2015.]

    ref:http://www.macworld.co.uk/how-to/mac-software/spotlight-search-tips-os-x-el-capi tan-yosemite-3531280/

  • by xser,

    xser xser Aug 3, 2016 3:31 PM in response to leroydouglas
    Level 1 (49 points)
    Mac OS X
    Aug 3, 2016 3:31 PM in response to leroydouglas

    (1) Interesting suggestion. Thanks.

    (2) The trouble is that all of the files I am looking for are PDF and they are in iCloud Drive.

    • "kind:PDF" would include the mail attachments that I am trying to exclude.
    • "kind:iCloud" and "folder:iCloud" and "folder:[name of folder in iCloud Drive] do not return any results.
    • are there other options for searching iCloud Drive from Spotlight?

     

    If not, then this actually does not help my situation unless I stop syncing my PDFs with my other Apple devices via iCloud Drive. But that would just trade one feature for another; it's not clear that it'd be a good trade for my purposes.

     

    Thanks again!

  • by CloGram,

    CloGram CloGram Aug 24, 2016 10:39 AM in response to leroydouglas
    Level 1 (9 points)
    Mac OS X
    Aug 24, 2016 10:39 AM in response to leroydouglas

    I agree with xser, and have tried the same things without success.

    It can be exhausting to do a search for a certain document, for example, that may be attached to several email conversations when I'm looking for the one that is not attached, but has been saved to my hard drive.

    My workaround is to "show all in Finder" and tap them one-by-one, watching at the bottom where it shows the folder-path (and I can see which are in a Mail folder, for example and which are on my drive).

    But this can be very tedious when there have been a lot of activity on a certain document or file (or set of files).

     

    leroydouglas, your suggestions for reducing by kind or by date don't often help. I thought "author:" might do it, but the sample Spotlight search I tried using author:[me] did not include the file I was looking for since I was not there original author (where without that, I get the dozens of unwanted items that were email attachments.).

     

    One thing I just tried is (in the Finder window search) adding Other>Spotlight items (which adds this to the menu options), and used "Spotlight items" "aren't included" and this seemed to get rid of the mail attachments. I didn't (yet) take the time to figure out if this works for my overall intentions. I will try this some more to see if this solves this issue.

     

     

    Mac OS 10.11.6

  • by xser,

    xser xser Aug 24, 2016 10:44 AM in response to CloGram
    Level 1 (49 points)
    Mac OS X
    Aug 24, 2016 10:44 AM in response to CloGram

    Thanks, CloGram. I'll be very interested to hear how the Finder search strategy works.

  • by CloGram,

    CloGram CloGram Aug 24, 2016 10:54 AM in response to xser
    Level 1 (9 points)
    Mac OS X
    Aug 24, 2016 10:54 AM in response to xser

    Hi Xser,

    It could be awhile... though I do many searches a day, I can't be sure this "parameter" will be one that is needed each time. So far, it's working perfectly, but with only a few tries. I'll definitely post again after I feel it's working (or not) for me. Meanwhile, see if you can give it a try.

     

    BTW I also just discovered the keyboard shortcut command-option-spacebar will open the Finder search instead of the Spotlight search. (I've been using command-spacebar for years... opens the Spotlight search – then I was having to scroll down to "Show all in Finder..." which I don't like).