[haiku-commits] Re: r39160 - in haiku/trunk: headers/private headers/private/index_server src/servers src/servers/index_server

  • From: "Clemens Zeidler" <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 29 Oct 2010 06:42:42 +1300

Am 28.10.2010, 03:25 Uhr, schrieb Stephan Assmus <superstippi@xxxxxx>:

Log:
Initial work on an index server. No add-on yet so quite useless at the moment, but a clucent full-text search add-on is coming soon.
Cool stuff, but I only see your copyright in the files. So this does not re-use any of the previous work done by Ankur Sethi on an index server from the 2009 HCD? Looking this up I stumbled over a forum entry which shows you've been having this in mind since at least 2006, though.

Yes I wanted to have such a server since I first use BeOS and queries... I took a look at Ankurs code and the first idea was to use it as a basis because it was well structured. The problem was that I wanted to have an add-on system to implement more then only a full text search, e.g. write attributes from id3 tags. Ankurs server only had the BApplication thread and a watcher/feeder thread. The application was the worker thread which put new files to the database and the watcher thread runs the modification query. Despite the communication between both thread was not thread safe renames, moves (not sure about deletes) where not handled and only the first modified file was processed (see my bfs query extension...). Also there were no catchup mechanism to handle files from when the server was not running.

Now, every volume has its own watcher and worker thread and the BApplication is responsible to manage everything, e.g. handle messages from a pref app. I think this is better and more responsible than process (index) every file in the BApplication.

So it was easier for me to rewrite the server. However, Ankurs work helps a lot to get into the CLucene API and the search app is also from him.

Regards,
        Clemens

Other related posts: