• 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: Tim Buchheim <email@hidden>
  • Date: Tue, 3 May 2005 12:20:07 -0700

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:

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>)

  • Prev by Date: Spotlight "UTI File Types"?
  • Next by Date: Re: CoreData: Data freshness vs. multithreading
  • 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