"Stephan Assmus" <superstippi@xxxxxx> wrote: > I am pretty sure that a separate database is the only possible way. > For the > simple reason, that document format plugins would otherwise render a > central > system component, the file system, unstable if they were executed in > it's context. Those are two different things; one could still have an API to maintain an index, and do the actual retrieval in userland. But as Ingo already pointed out, the BFS index is not really suited for user search (ie. content search). > I think there ought to be an article on Ars about how Spotlight works > internally > (how it stays in sync with the filesystem notifications). That's simple: the kernel writes its notification messages in a simplified format (I think it was folder only) to disk -- it maintains that file like BFS would maintain its index, ie. online. Spotlight then only reads the changes from this file. But as François already pointed out, BFS can do better by just having a (live) query for recently modified files. Our index server (that should probably also take over the background MIME type setting from the registrar) would then only need to remember where it was (in that query result), and make sure that the database would not be corrupted on crash (either via file logging (which is currently not supported in our BFS implementation), or by using fsync() correctly). Bye, Axel.