Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Constants for your query' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Constants for your query
Authored by: Han Solo on May 07, '05 11:37:51AM
Yes, although a comprehensive discussion of the syntax is available from Apple. The article by Siracusa also notes that:
Each piece of metadata is stored in the Spotlight index using a key string. Apple has defined keys for many common attributes. These keys are defined as symbolic constants in a header file, using the "k"-prefixed Carbon naming convention for constants. They range from generic attributes like kMDItemKeywords, kMDItemTitle, and kMDItemComment to format-specific attributes like kMDItemAudioBitRate, kMDItemMaxAperture, and kMDItemLyricist. There are over 100 of these constants.
So knowing the query syntax, while important, is (arguably) less than half the battle. Turns out that a list (I don't know how complete) of these constants (keys) can be found in an Apple PDF as well. There are some unusual ones, including a whole host of audio-based ones (such as kMDItemAppleLoopsRootKey) -- perhaps an update to Garageband and/or Logic that will integrate Spotlight is in the works.

The bottom line, however, is that if developers do not adhere to Apple's keys, and instead start using their own overlapping and redundant ones, Spotlight will end up being much less useful than it could be. Sure, Apple can exhort developers to "play along," but why do I envision kMDMicrosoftAuthors, etc., suddenly appearing in the next version of Office...?

[ Reply to This | # ]