Re: Spotlighting databases and preferences...
Re: Spotlighting databases and preferences...
- Subject: Re: Spotlighting databases and preferences...
- From: Jonathon Mah <email@hidden>
- Date: Mon, 31 Oct 2005 18:33:34 +1030
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:
This email sent to email@hidden