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 May 3, 2005, at 11:57 AM, Ali Lalani wrote:

No this will not work. (Spotlight knows nothing about filter services)

Spotlight does not go into packages at all.

Basically you will have to write a plugin for you file-package that will also index the rtfd files stored within.

Vince


How would this work? If the files stored within got changed and spotlight doesn't pay attention to them then no importer would ever get called. How would you trigger this "re-indexing" of your file package?

Your importer will get notified as if the entire package has changed. if the package looks like this


foo.mypackage/
    file.rtfd/
            text.rtf
    file2.rtfd/
            text.rtf

if you edit file2.rtfd/text.rtf then your importer will get notified that foo.mypackage has changed.


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'm not using CoreData at the moment but i did come across this little article:
http://developer.apple.com/documentation/Cocoa/Conceptual/ NSPersistentDocumentTutorial/07_Metadata/chapter_8_section_7.html


I'm not sure i understand this one, which, admittedly is probably because my knowledge of CoreData is somewhat limited. However, what that article suggests is that somehow CoreData takes care of most of the work of doing a spotlight importer.
What confuses me is that if i have an sqlite database, and i make a change, my importer would get called independently, how would it know what "record" it is updating in spotlight?



For now you basically need to leave a trail file (not sure what to call it) and update that file when the data in the sql lite database changes etc.


For example in iCal the calendars are stored as they normally are but, in Library/Caches/Metadata/iCal/ are the spotlight files that get indexed and presented to the user, when one of these files is selected iCal starts up and should select the event for that day etc..

Delicious Library is doing exactly the same thing.

Vince

Thanks!

    Ali



_______________________________________________ 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.