Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlighting databases and preferences...



Hi John,

On 2005-10-31, at 17:22, <email@hidden> wrote:

I've started working with Spotlight and have two questions:

1) Can I search my application's preferences (user defaults) with a
Spotlight Importerand how would I do this? Preferences and Core Data can hold lots of
informationthat I would like to search with Spotlight.

Why do you want to search your user defaults? If you wanted, you could make a generic plist importer (but you're probably wanting something more specific).


2) Is it possible to Spotlight databases in an efficient manner and return
databaserecords? Since a database is a single file, Spotlighting a database and
getting thename of your database back doesn't seem useful. I'm told that Spotlight
can returnan individual record but the code is somewhat fancy.

No. One file <=> one Spotlight record. If you want multiple Spotlight entires, you will have to make a separate file for each record. Lots of apps do this (iCal, for example) -- they explode the database into individual files in ~/Library/Caches/Metadata. Note that each file does not need to contain all the record information. Instead it could just store a record ID, for example, and have the importer refer to the full database for the rest of the metadata.


Also, be aware of the Spotlight-dev list <spotlight- email@hidden> if you have any other Spotlight-y questions. It's not very active, though.


Jonathon Mah 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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Spotlighting databases and preferences... (From: <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.