another rewrite of the db module, added fulltext search