Smart folders were one of the reasons I bought Tiger, and it's been annoying me that I couldn't do as much with them as I wanted. For example, I create a lot of JPEG, PNG, and PDF files for clients, and they usually have the word "draft" or "preview" in them. I wanted a smart folder that would collect the newest ones in once place, but the smart folder GUI wasn't smart enough to allow "or" logic. (I couldn't specify a search for images
or PDF documents.)
However, thanks to a hint at MacOSXHints.com, I've found you can put in a query of any complexity by choosing "Other Raw Query"; and after much experimenting and reading Apple's support documents, I figured out how to get what I want:
(kMDItemDisplayName == "*preview*"c || kMDItemDisplayName == "*draft*"c) && (kMDItemContentTypeTree == "com.adobe.pdf" || kMDItemContentTypeTree == "public.image") && (kMDItemFSContentChangeDate > $time.today(-28))
&& means "and", || means "or", and so on.
If you're constructing your own smart folder queries, you might find these documents helpful:
Spotlight Query Syntax
Uniform Type Identifiers (useful for knowing how Spotlight categorizes file types)