Alfred Productivity Tips: Tweaking your search results to show just what you want

Lego knight in shining armourWe all use our Macs slightly differently, squirrelling files away in all sorts of obscure locations with, sometimes, less than helpful names or folder organisation.

This is where Alfred comes in, like a knight in shining armour against the mountains of files on your Mac. Below are a few ways to tweak your settings to ensure Alfred is ready to serve YOU.

Setting your default results

If you’re looking at your Default Results preference pane and thinking “What is she on about? Searching couldn’t be simpler!” And you know what? You’d be half-right. The default settings for Alfred will suit a good portion of users straight out of the box, allowing you to find the bulk of the files you need.

However, if you need him to tend to your every need, you can tweak the settings to reflect this. To create as little noise as possible, choose only the file types you really want to see every time you search, e.g. Applications, Folders and Contacts.

Don’t check every box unless you want every document, text file and image for “Spot the dog” every time you start typing “spo…” to launch Spotify.

The default search limits your results to 9 items to be as fast as possible. Want more results? Want a broader search? Keep on reading!

Widening your search scope

By default, the search scope covers the locations where Mac files are usually stored, such as your home folder, Applications folder, etc. However, if you store your files elsewhere, you’ll want to use the + button to add the additional paths you need Alfred to include in default searches.

Searching all file types

Now you really are looking for every file and folder relating to Spot the dog, no matter what the file is. You want all those cute doggy photos, videos and stories and you want them NOW!

Hot tip:

Listen carefully. This is one of the Alfred search gems you’ll never want to forget once you’ve used it…

  • Use “find” to reveal a file in Finder
  • Use “open” (or hit the spacebar) to open a file
  • Use “in” to search for the content of files

Search for Spot the dog

Like so, with a single tap of the spacebar or the “open” keyword, you can expand the scope of your search without cluttering your everyday search results.

Still need to refine the contents of this broad search? Go to the Features > File Search > Exclusions & Scope tab in the preferences to select the file types you want Alfred to show you. I always hide emails, calendar items and browser history, for example, as I have so many unnecessary noisy results in there.

When using any of the 3 file search keywords, Alfred shows 20 results by default but this can be expanded to 40 in the preferences. Handy!

Working with external drives

You’ve probably worked out by now that Alfred’s a rather accommodating chap and that he’ll do everything he can to help you.

He’ll be happy to include external volumes in your searches, on two conditions. First, Spotlight must have the drive indexed for search and, secondly, the scope in File Search > Exclusions & Scope must be set to include Everything.

A few more handy tips for fussy naming

Not happy calling a file by its name? Be Alfred’s guest and give the file a nickname.

Using Spotlight Comments, you can assign short names or nicknames to applications or files.

For example, I use a developer app called “Instruments” to test Alfred for Memory Leaks, but when it’s my own memory that starts leaking, I can’t remember the app’s name. For this reason, it now has a Spotlight Comment for “leaks”, ensuring I find it every time. Go ahead and do the same with your own apps!

Leaks instruments

In the case of apps, you can also turn on fuzzy matching in the Alfred’s Applications preferences, allowing you to use a partial match (e.g. “gc” for Google Chrome) without setting a Spotlight Comment. With Anchored turned on, Alfred will only search from the first character of every word, while turning it off will go more freestyle by showing any fuzzy match.

Hot tip:

Use Spotlight Comments to assign a short name or nickname to a file, or turn on fuzzy matching in the Applications preferences to match on the fly.

What to do if Alfred can’t find what you want

Alfred relies on your OS X metadata being healthy. This metadata is maintained by Spotlight and, on very rare occasions, can get out of date or corrupted. We’ve outlined easy diagnostics steps to follow if this happens.

Want more Alfred tips? Next time, we’ll look at the iTunes Mini Player to add a bit of music to your day!

In the meantime, don’t forget to check out Anna’s Alfred Tips blog, filled with more tricks and tips for using Alfred than you can dream of!

[Image credit: Knight in shining armor by Pascal]

13 thoughts on “Alfred Productivity Tips: Tweaking your search results to show just what you want

  1. Great set of needed, and basic, tips. Alfred is a fine app and I use it constantly. But it has one annoyance: you should be able to set the action that a spacebar causes. I’d prefer it to mean “find,” but I can imagine than someone else would like it to mean “in.”

    • Don’t forget that you can swap the “find” keyword to whatever you like so you could shorten “find” to “f” or another character of your choice. As Open is the most common and most useful action, that’s the one the Spacebar is tied to. :)

  2. Nice post. I see you use Spotify too. Is it possible to make a custom Spotify music search with Alfred?
    Also it would be awesome with a Spotify Mini player, just like iTunes =)

    • For now, you can search Spotify with this custom search:

      In the future, we hope to do some fun Spotify integration as we love it too :)

      • Is there documentation on how to create additional custom searches?

        I’d love to augment the search results with some web services.

      • Thanks for the link! I’d love to know if there is a way to take things a bit further. Can I bring those search results, inline, into the Alfred search results?

        Given an additional result set (retrievable by whatever means), I’d like to append it to what Alfred finds within the interface. Is this currently possible? I’m willing to do a fair bit of coding to make it happen.

  3. Is there a way to “narrow” the search context. For example, when searching for a file, I would like to exclude searching the mail library (/library/mail). Checking Mail in Exclusions & Scope does not seem to impact this. This is a potential deal-breaker for us as the search keeps finding file attachments in email before the actual file location within Finder.

  4. After installing the movie phrase search command (

    1) command-space
    2) “mf perfect servant”
    3) enter

    Result 1:

    Gosford Park (2001):
    02:03:10 It’s the gift of anticipation.
    02:03:13 I am a good servant. I’m better. I’m the best.
    02:03:16 I’m the perfect servant.
    02:03:18 When they’re hungry, food is ready. When they’re tired, a bed.
    02:03:23 I know before they know it.

    Alfred App. The perfect servant.

  5. It would be nice to have some way of narrowing search too. One example I have is “Radioshift” – an application that can record internet radio, so I can turn it into podcasts I can listen to on the go.

    If I start entering “radio”, I get radioshift… but I also get lots of “Radioshift Helper (XXXXXXXXXX)” hits from ~/Library/Application Support/Radioshift/Helper Agent/

    Being able to exclude directories like that would be nice

    • You can already exclude whole directories very easily.

      Pop up Spotlight’s preferences and drag any folder you don’t want indexed into the Privacy tab. Both Spotlight and Alfred will ignore these results in searches. You can ignore single files by adding “alfred:ignore” as a Spotlight Comment too :)

Comments are closed.