10.5: Get more from Spotlight with new operators

Nov 15, '07 03:04:00PM

Contributed by: robg

In OS X 10.4, there were a few special operators you could use to narrow your results. For instance, kind:pdf or date:tomorrow were acceptable search terms. In 10.5, the number of such operators has been greatly expanded, though there's little to no documentation on what's available.

Early on, I stumbled on the filename: syntax, which lets you quickly find by filename (use filename:"file name in quotes" for filenames with spaces in them). Macworld author Kirk McElhearn was intrigued by Spotlight's new powers, and started digging. What he discovered are some new ways to use the existing operators, as well as a slew of new operators. You can read his Spotlight's Secret Search Syntax article for all the details, but I'll hit a few highlights here.

For example, you can now use greater than, less than, or equals signs with the date operator:

date:>10/26/07

The results will be what you'd expect -- any file modified after October 26th, 2007 (and on my machine, there's a ton of those now!).

But more interesting than that are the huge variety of brand new operators and functions:

Many of these operators existed in 10.4, but to use them, you had to work through the Others pop-up in the Finder's search box. Now you can type them directly into the Spotlight (or Finder) search box. Just type, for instance, iso:>400 or codec:aac, and off you go.

You can find a long list of these operators in the following file; the section of interest starts on line 312:
/System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/English.lproj/schema.strings
As of now, these short names aren't documented, so this file is the only spot you'll find them. You can, of course, still use the Others pop-up to get the full names and descriptions, but the shortcuts are much quicker to use.

Update: David Pogue was kind enough to send along an excerpt of his upcoming OS X 10.5 Missing Manual on Spotlight's new advanced operators. Feel free to download and read: PDF [199KB]Text [27KB] ... Thanks, David!

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20071115150413809