Information and Links
Join the fray by commenting, tracking what others have to say, or linking to it from your blog.
Getting the most out of Leopard’s Spotlight menu

Leopard Spotlight is infintely better than Tiger Spotlight; it’s faster and is much more flexible. Apple has made the searching easy by adding simple nature language Attributes which make searching for particular metadata easy. I’ve been exploring what tags can used in the spotlight menu.
Attributes are the tags like date: or kind: etc. These are incredibly useful but don’t seem to be well documented anywhere. I’ve made a collection of some of the attributes I’ve found, be sure to add any useful ones you’ve found in the comments

When was a file used, modified, looked at etc?
date: (checks lastused and duedate:), created:, used:, lastused:, duedate:
These are self explanatory but very useful. The only concern is the formats you use for the dates.
date format
Unfortunately, Apple hasn’t been consistent with the way you can enter dates for the above attributes. For the date: you can use relative and word dates and is fairly flexible: today, tomorrow, “this week”, “this month”, “this year”, (”next X” or “last X” doesn’t work).

For the rest of the date attributes you have to use the format month/day/YEAR with year as 4 digits eg 2007. Amazingly, Apple has made it so that spotlight honours the data format in the international System Preference. So if you’re in the UK or Australia and have your preference set for those date formats enter day/month/year. If you change the preference and then use terminal to do a mdfind it’ll produce two different results… Automagical! Good on you Apple!
Examples
modified:5/11/2007 or in the US modified:11/5/2007
modified:5/11/2007-6/11/2007
For example, what applications did I use yesterday?
used:5/11/2007 AND kind:application
Searching for Files
filename:
Self explanatory, as it says on the box?
kind:
documents, image, presentation, PDF, music, mp3, Applications, events, fonts, safari (webpages),preference ,contact, person ,email, message
Examples
kind:safari AND date:today
N.B. make sure you Spotlight Preferences allow the view of the filetype you want (for example I don’t have Music files displaying in the spotlight menu and it was confusing me when i searched kind:music that nothing came up!)
author:
language:
this is interesting. It identified Shiira as the only program I had with a Swedish localisation
wherefrom:
This is a great attribute it allows you to identify files downloaded from the internet (with Safari at least) and files attached to emails. This is how Apple keeps tracks of your downloads and asks if you really want to open an Application.
example
wherefrom:apple.com
Email Search from the Spotlight
subject:, recipient:, cc:, from:
Very useful attributes for searching for email from your Spotlight menu. It’s easier than starting up Mail and starting a search. Really Quick!

Images
Lots of attributes here, I won’t go into too many but send in any useful ones.
pixelwidth: pixelheight:
example pixelwith:>3500 (show me images which are larger than 3500 pixels across)
flash: 0 or 1 (image files created where the camera used flash)

Nested Searches, Lots of AND OR and brackets
This is so useful, you can basically write what ever sort
Very powerful: eg. show me my emails from yesterday and
(date:yesterday AND kind:email) OR duedate:5/11/2008
Command Keys for the Spotlight Menu
Open the top hit: ⌘-Return
Move to the first item in the next category: ⌘-Down Arrow
Move to the first item in the previous category: ⌘-Up Arrow
Move to the first item in the menu: Control-Up Arrow
Move to the last item in the menu: Control-Down Arrow
Display an item in the Finder: ⌘-click the item
thanks for this, much appreciated.
I wonder where we can get a hold of ALL possible search attributes? I would love to see such a list