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: Spotlight -- Metadata importer vs file package containing rtfd files



On 5/3/05, Ali Lalani <email@hidden> wrote:
> Furthermore i'm a bit confused as to how to proceed with regard to an
> sqlite database.
> If each file represents one result in a spotlight search, and my
> single-file sqlite database represents thousands of potential results,
> is there any way to do this other than managing two data stores(one
> sqlite database, and one folder full of special files representing each
> record in the sqlite database)?

I think you have to do the same awful hack that Address Book, iCal,
and Safari use:  create a cache directory somewhere with fake
documents which your Spotlight plugin can index. (note that they don't
have to contain copies of all the data .. just some sort of key
indexing into your database so your plugin can then pull the data from
the original database file)

Take a look at ~/Library/Caches/Metadata/* and
~/Library/Caches/com.apple.AddressBook/MetaData/  (No, I don't know
why they use two different pathname conventions, nor do they document
which one should be used.)

This is a really ugly hack. It only works properly for apps like
Address Book or iCal where the user only ever has one document.  For a
normal document-based application I don't know what you'd do.

I've filed a bug with Apple (rdar://4102273) because they really need
to address this problem, and soon.  Spotlight plugins need to be able
to return multiple search result for a single file (for example, the
Address Book plugin ought to run on the actual AB file instead of the
stupid "cache" files, and return all the users/groups).  If Apple
doesn't plan to add that functionality to Spotlight, then they need to
document a recommended solution.



-- 
Tim Buchheim
 _______________________________________________
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: 
 >Spotlight -- Metadata importer vs file package containing rtfd files (From: Kirk Kerekes <email@hidden>)
 >Re: Spotlight -- Metadata importer vs file package containing rtfd files (From: Vince DeMarco <email@hidden>)
 >Re: Spotlight -- Metadata importer vs file package containing rtfd files (From: Ali Lalani <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.