Meta application icon Searching On Specific Metadata Keys

For more advanced searches, Meta allows you to search for documents with values in specific metadata keys. (What's metadata?) If you know that the document you're looking for has a particular value in a specific metadata key, this is a very effective way to get the exact results you're looking for.

For example, if you're looking for email messages on your computer that were sent to you from Apple, you can use a key-specific search, like this:

kind:email and kMDItemAuthors like[c] *apple*

This query is a bit advanced. It tells Meta to find all the emails on your computer that have the word "apple" in their kMDItemAuthors metadata key, which is where the file's author (in this case, the From heading of the email message) is stored. Furthermore, this search specifies that the search should not be case-sensitive, so that it'll find files having "Apple", "apple", or "aPpLe" in their kMDItemAuthors keys, etc. This is done by putting the "[c]" directly after the word "like". If you were to omit the "[c]", like this:

kind:email and kMDItemAuthors like *apple*

it would only find emails with the word "apple" all in lower-case, just like it is shown in the search string.

Another interesting thing about this search string is the use of the "*" character. That asterisk character tells Meta where that metadata key value can have unspecified values. If you're familiar with the command-line interface (i.e. Terminal.app), this should seem familiar to you. So, by using the string "*apple*" in the search above, you're saying that the kMDItemAuthors metadata key can contain any value that has the string "apple" in it with any value before or after it.

If you were to use "apple*" instead of "*apple*", it would only find emails for which the kMDItemAuthors metadata key begins with "apple", and having any value following that word. Thus, it would return emails with the kMDItemAuthors value of "appletastic", but not "pineapple". And if you were to use the "apple" instead of "*apple*", it would only return emails with the exact value of "apple" for the kMDItemAuthor metadata key.

Learning More: Key Search Syntax

Generally speaking, metadata key searches consist of a metadata key name, followed by an operator, followed by a value, like this:

key_name operator value

Learning More: Valid Metadata Key Names

The key name can be any valid metadata key name. Here's a link to Apple's list of standard Spotlight metadata keys:

Spotlight Metadata Attributes (on developer.apple.com)

You can also find metadata key names by putting your mouse over any key name in Meta's Item Details view in the Search Window, like this:

Part of the Meta Search Window, showing a mouse hovering over a metadata key name in the Meta Search Window, with the tooltip showing the technical name of the metadata key name.

Learning More: Valid Search Operators

The operator can be one of a number of allowable operators, such as like, =, or >. For a complete list of the operators Meta understands, refer to the Operators reference article.

Valid Metadata Key Values

The value can be a string, number, or date specification. For more information about allowable values, refer to the Values reference article.