• 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, Content Indexing, and SearchKit integration questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight, Content Indexing, and SearchKit integration questions


  • Subject: Re: Spotlight, Content Indexing, and SearchKit integration questions
  • From: Mark T <email@hidden>
  • Date: Thu, 02 Jun 2005 11:43:28 -0400


On Jun 2, 2005, at 10:12 AM, Dr. Smoke wrote:

I also suspect ContentIndex.db is created by SearchKit, but it is only one part of the "metadata store." Again, the entire "metadata store" -- as I interpret Spotlight -- is the .Spotlight-V100 directory, not just ContentIndex.db.

Yeah, I didn't really mean to call ContentIndex.db the metadata store. As I said later, store.db is a metadata index. The entire Spotlight directory could be called a metadata store, I guess.


Thought so. Did you also dump /.Spotlight/.store.db? I've been trying to figure out why there are two *store.db files of exactly the same size.

.store.db looks similar to store.db. I don't know why there are two files that are pretty much the same. I don't intend to do a diff, as a simple ascii-dump takes a while with such a large file.


How did you install Tiger? If you used either Archive & Install or Erase & Install, then the earlier info I was provided is correct.

I used Archive & Install. You were right. I still don't know why it's there.


I can't figure out what it does, though. I was under the impression that it was used by the old content indexing system. I have no idea how it fits into Spotlight.

As to why it's still in Tiger, that's my question exactly. You are correct in that, under Jaguar and Panther, ContentIndexing.app was used to perform content indexing of folders and volumes for use by Find By Content in Finder's Find (Command-F) function.

Maybe someone from Apple could enlighten us?

From the Spotlight Importer Programming Guide:

"When metadata is extracted for a file, the GetMetadataForFile function is called. The function is passed the plug-in interface, a mutable dictionary that you’ll add the metadata attribute keys and values to, the UTI type of the target file, and the full path to the target file...Your implementation of this function should extract the metadata from the file and insert it into the dictionary with the appropriate keys and values. If it successfully returns metadata, the function should return with a value of true. If no metadata was extracted, you should return false."

Looks like Spotlight adds whatever the importer returns for text content to the SearchKit index. The importer never has to know about the SearchKit part of the whole business.

That's a very generic description. It does not address how the bundled mdimporter objects may be calling SearchKit for indexing.

It doesn't look like the mdimporters call SearchKit at all. Spotlight does that part with the information returned by the importer.


There's actually a very simple example in the Spotlight Importer Programming Guide. I haven't needed to write one yet, so I was just looking at it now. The example is for a property list with Author, Title, and Notes fields. Those all go under the metadata category; there's no example that I've found with any content indexing.

Exactly my point: how the content index, ContentIndex.kb, is being created in .Spotlight-V100 is undocumented and there are no examples of how kMDItemTextContent is handled using the bundled importers. I've reviewed the example in that doc. ;-)

Apple doesn't want us to know. The Spotlight team knows about how each file is created. It would be nice to know a bit more about the internals, though.


I see a new "SearchKit Reference" was just published:

http://developer.apple.com/documentation/UserExperience/Reference/ SearchKit/index.html

I'll have to take a detailed look at it. I find it interesting that it states

"You can use Search Kit or Spotlight to provide similar functionality and powerful information-access capabilities within your Mac OS X application."

whereas the quotes I cited before from "Mac OS X Technology Overview" said "don't use Spotlight for content search: use SearchKit" Go figure. ;-)

SearchKit is per-application, Spotlight is system-wide. I interpret the part about using Spotlight for search functionality in your application as meaning that you should make an importer so that system-wide Spotlight searches can access your data. I assume some of the metadata portions of Spotlight will trickle down to SearchKit, so custom metadata will be easier to search. _______________________________________________
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: 
 >Re: Spotlight, Content Indexing, and SearchKit integration questions (From: Mark T <email@hidden>)
 >Re: Spotlight, Content Indexing, and SearchKit integration questions (From: Mark T <email@hidden>)
 >Re: Spotlight, Content Indexing, and SearchKit integration questions (From: "Dr. Smoke" <email@hidden>)

  • Prev by Date: Re: ASCII problem
  • Next by Date: "Generic" data type in Automator
  • Previous by thread: Re: Spotlight, Content Indexing, and SearchKit integration questions
  • Next by thread: Re: Spotlight, Content Indexing, and SearchKit integration questions
  • Index(es):
    • Date
    • Thread