• 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 -- Metadata importer vs file package containing rtfd files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight -- Metadata importer vs file package containing rtfd files


  • Subject: Re: Spotlight -- Metadata importer vs file package containing rtfd files
  • From: Vince DeMarco <email@hidden>
  • Date: Tue, 3 May 2005 13:54:29 -0700


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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Spotlight -- Metadata importer vs file package containing rtfd files
      • From: Ali Lalani <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>)

  • Prev by Date: Re: CoreData: Data freshness vs. multithreading
  • Next by Date: Re: Spotlight Importer Issue
  • Previous by thread: Re: Spotlight -- Metadata importer vs file package containing rtfd files
  • Next by thread: Re: Spotlight -- Metadata importer vs file package containing rtfd files
  • Index(es):
    • Date
    • Thread