• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spotlight introspection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight introspection


  • Subject: Re: Spotlight introspection
  • From: Ryan Britton <email@hidden>
  • Date: Wed, 23 Nov 2005 06:10:15 -0800

You can use something like this to get the list:

CFArrayRef attributeTagCFArray = MDSchemaCopyAllAttributes();

That will contain the attribute keys that you can then use for these or in any queries:

CFDictionaryRef metaAttributes = MDSchemaCopyMetaAttributesForAttribute((CFStringRef) attributeKey);
CFStringRef attributeName = MDSchemaCopyDisplayNameForAttribute ((CFStringRef) attributeKey);



If you look up the docs on those, you can get a list of what they contain. Of particular interest is kMDAttributeType in the meta attributes.



On Nov 23, 2005, at 1:27 AM, Pierre Bernard wrote:

Hi!

Apple defines a list of common metadata attributes (http:// developer.apple.com/documentation/Carbon/Reference/ MetadataAttributesRef/index.html). They leave it to the developers of Spotlight importers to define custom attributes as needed.

Is it possible to query the Spotlight server for a list of defined (or actually used) attributes and their definition?

I.e. While I know the 'kMDItemAuthors' attribute exists, a third- party program may have defined a 'photographer' attribute that I could query too. The trouble is finding which attributes exists and what acceptable values are.

TIA
Pierre Bernard

---
Spinning WebObjects or cooking up Cocoa in Switzerland?
Let me know: http://homepage.mac.com/I_love_my/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Spotlight introspection (From: Pierre Bernard <email@hidden>)

  • Prev by Date: About RTF and Arial
  • Next by Date: Re: CoreData Fetch Request Failing When Using NSDate in NSPredicate
  • Previous by thread: Spotlight introspection
  • Next by thread: Re: Spotlight introspection
  • Index(es):
    • Date
    • Thread