> Hi, > > Von: Truls Becken <truls.becken@xxxxxxxxx> > > Stephan Assmus 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. I think there ought to be an article on Ars about how > > Spotlight works internally (how it stays in sync with the > > filesystem > > notifications). > > > > An extractor running completely in userland does in no way mean a > > separate database is required. All it has to do is write attributes > > on > > the file in the normal fashion. > > > > The SkyOS Index Feeder saves meta data to attributes and full > > content > > to a database. Like already mentioned, some file types will only > > have > > meta data, while others have both. I think this is the only > > reasonable > > approach unless the full text index could also be implemented using > > attributes (requires changes to BFS). > > Absolutely agreed, what I really meant was that the full text > indexing > could not be built into BFS itself, but that it would need to be a > separate userland service. Well extracting the data will have to be done in userland. Another option for the storage would be extended semantics on attributes. Some flag like B_APPEND_TO_INDEX Indexing a file containing "Haiku rox windows sux" would issue fs_write_attribute_etc("BEOS:CONTENT", "haiku", B_APPEND_TO_INDEX); fs_write_attribute_etc("BEOS:CONTENT", "rox", B_APPEND_TO_INDEX); fs_write_attribute_etc("BEOS:CONTENT", "windows", B_APPEND_TO_INDEX); fs_write_attribute_etc("BEOS:CONTENT", "sux", B_APPEND_TO_INDEX); Of course this would require many ops but would work. Would also need some way to clean up all the values for this file before reindexing. François.