Using Spotlight as the "database" of an application Using Spotlight as the "database" of an application database database

Using Spotlight as the "database" of an application


Several apps ship this way. I believe there is at least one company that puts all their customer data into text files to use Spotlight to find information. I save notes with keywords all the time with full confidence that Spotlight will be able to find it later!

In general, you don't need to prod Spotlight to keep the index up to date. It is very good about watching file changes and indexing rapidly.

The key, really, is figuring out your file format. If you go with something that Spotlight can index -- say, text files -- then you don't have to write an importer. If not, you do. Also, have a look at Core Data as it has excellent Spotlight support, too.

One caveat; there are those users that manually turn off spotlight indexing on a particular volume. Rare, but possible.