How to run advanced Spotlight searches in the Finder
In my previous two articles about using Spotlight on Yosemite, I looked at Spotlight basics and then showed you how to construct search queries with Spotlight. In this final article, I'm going to move from Spotlight to the Finder, and show you how to perform even more advanced searches.
When you search in the Finder, you're actually searching the Spotlight index on your disk; you just perform your searches from the Finder's search field instead of the Spotlight menu. And, when you move to the Finder, you have even more power to search.
Start a Finder search
There are several ways to access Spotlight in the Finder. You can open a Finder window and click in the search field at the top, or you can press Command-F to convert any open Finder window into a search window.
You can also access the Finder window search after you’ve started a query in the Spotlight menu (useful if you’ve got too many results). Simply scroll down in the results list until you get to the bottom and click Show All in Finder; Spotlight will open a new Finder window showing the results of your search.
If the Finder displays your search results in Icon view, you’ll probably want to switch to List view to get a better look at your results. You can then select the column headers to sort by name, kind, or date. If you want more column headers visible, press Command-J and check other columns from the View Options window.
Hone your search
The Finder window’s search bar contains several options for tailoring your results. When you start typing search terms, the Finder pops up a menu asking if you want to restrict your search terms to file names only. And you can click on This Mac to change the target of your search from the folder you were in when you started searching, to your entire Mac.
On the right side of the Finder window’s search bar is a plus-sign button. Click it to display two menus; by default, the first is set to Kind, and the second is set to Any. But there are other options to choose from.
To narrow down your results, start by selecting one of the criteria in the first menu, such as Created Date, Last Opened Date, or Name. Or choose Other to call dozens of other options, including Authors, Audio Bit Rate, Email Addresses, Recipients (people who received a certain file), Layers (names of Photoshop layers), and much more. Click on the check box next to an item if you want it to appear in the first menu for easy access in the future. As you select different options, the second menu changes dynamically so you can set the appropriate parameters (such as dates, numbers, and so on).
If you’re looking for a particular type of file, keep the first menu set to Kind, and use the Any menu to select from Images, Documents, Movies, and more. (It’s the same as using the kind: keyword, which I discussed in this article, only you don’t need to remember the keywords or manually enter them.) You can access more file types by choosing Other from the Any menu and then entering a kind of file in the text field, such as Excel or MP3.
Combine multiple queries
Sometimes a search requires more than one set of criteria to summon the results you want. Finder window searches let you specify as many parameters as you want. Say you want to search for all PDF documents you’ve opened in the past month. To do this, leave the first menu set to Kind, and set the Any menu to PDF. Click on the plus sign in the search bar to add another search parameter. Set this one to Last Opened Date Is Within Last, enter 1 in the box, and select Months from the last menu. Spotlight will display all PDF files you created or updated within the past month.
Although it’s not obvious, you can use quotes to specify that a search should look at the exact phrase you type; just type quotes around your search terms. You can also use Boolean search terms to set up a Finder search, to exclude criteria or to create an OR search. Once you have one condition set up, you can add a Boolean term to your next condition by option-clicking the plus sign. The plus sign will turn into an ellipsis (…), and you’ll get a new pull-down menu with options for Any (OR), All (AND), or None (NOT).
Save searches for later
What if you plan to search for recently created and updated Word files once a month, so you can back them up? There’s no reason to manually type the same commands every time. You can save yourself some work by preserving the searches you run regularly as smart folders.
To save your current search as a smart folder, click on the Save button in the search bar, enter a name for the folder, and select a location to save it in. Enable the Add To Sidebar option if you want to make your smart folder a permanent fixture in that locale. Whenever you open this smart folder, Spotlight will run the search again and update the results with all files that fit the criteria.
If you want to change your search, or add or remove criteria, simply open the smart folder, click the action button (the gear icon), and select Show Search Criteria.
When Spotlight isn't enough
You may feel that the above isn't very user-friendly. It's a bit finicky to mess with all those menus and criteria. If you want a better way to search your Mac with Spotlight, a third-party app such as $29 HoudahSpot might be for you. HoudahSpot accesses your Spotlight indices, searching exactly the same way as the Spotlight menu or Finder windows. But it brings the power of advanced searches front and center. Instead of needing to learn arcane keywords and remembering Boolean operators, HoudahSpot lets you access complex searches using a series of menus.
HoudahSpot also lets you save searches as templates, so you can access them again at any time.
Spotlight is very powerful. With everything you've learned in these three articles, you'll be able to find any file on your Mac, no matter where it's hiding. Take some time to learn how to make complex Spotlight queries, and you'll find files in seconds.