[haiku] Re: Need Some GSoC Advice

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 21 Mar 2009 17:53:46 +0100 CET

> > 3. Spotlight-like Indexing Features for Haiku - I must confess I 
> > have
> > no idea where or how I'd begin with this one, but it's something 
> > I'd
> > definitely love to see this in Haiku. Spotlight is one feature of 
> > OS X
> > that I wouldn't give up for a million dollars.
> Last summer I looked into this one extensively for R2, so I know a 
> little bit about what's involved. There are three basic parts to 
> putting 
> together something like Spotlight for Haiku:
> 
> First, the Node Monitor needs another call which just specifies the 
> volume to monitor so that modification to any file on a particular 
> volume triggers a notification. IIRC Linux does it this way, too. It 
> involves a few small tweaks to a couple of system source files, but 
> nothing major.

Hmm I believe it might already be possible to run a live query on the 
volume for last_modified > %now% and get newely changed files from it.

> Second, you'll need to implement the indexer. Most of the work 
> involved 
> in the entire project is done on this. The indexer is like a web 
> spider 
> except that it accesses files directly instead of working over HTTP. 
> Actually storing metadata might be a challenge just because you could 
> store it in attributes on BFS volumes, but we still have to deal with 
> FAT32 and other filesystems which don't have them. IIRC, Tracker -- 
> that 

That's something that can be done with the overlay fs currently in 
development.

> is, the indexer included with Ubuntu -- stores metadata in a SQLite 
> database for this. Luckily, there is a working port of SQLite to 
> BeOS. 

While it would be nice to be able to reuse data from Linux, they likely 
don't map directly.

> Writing indexing plugins is also needed -- a plugin architecture is 
> typically used for different indexed filetypes to add flexibility.

Yes, could be possible to reuse translators as a first intention.

> Lastly, you'll need to write the search interface and API. This isn't 
> all that involved. A simple search program could be written for a 
> proof-of-concept and Tracker integration could be done later on.

I think we already have some attempts on bebits.

François.

Other related posts: