Saturday, January 19, 2008

For those using redland for RDF in the wild

Not so much if, but when redland corrupts its db4 files here is a series of commands that you might want to shove into a script. Though you really want to setup daily db_dumps that are archived if you use redland for data you care about.

I have attempted and posted a patch and nagged to get this fixed mainline. But I'm not holding my breath that it will be fixed any time soon. I might have to dump redland, fork it proper, or some other nasty solution to stop libferris users complaining about apps "crashing" which is directly due to redland getting its db4s stuffed.

You get the pleasure of running this on all your redland db4 files to try to recover (at least you can run client apps again without a segv in the redland code).

$ db_dump -r myrdf-so2p.db > myrdf-so2p.dump
db_dump: myrdf-so2p.db: DB_VERIFY_BAD: Database verification failed
$ rm -f myrdf-so2p.db
$ db_load -f myrdf-so2p.dump myrdf-so2p.db
$ rm -f myrdf-so2p.dump

The public bug is here

Saturday, January 5, 2008

Manufacturing Descent

The joys of changing one of the base libraries of the libferris suite. I had to release 8 packages at once because the base library had a few cleanups that were not backward compatible. I thought it was better to just break things a little now before the OBS packages for Fedora, openSUSE and Ubuntu are publicised for general consumption.

In other news, you can now get two sets of EA for results from a search on a PostgreSQL EA index. inside either the "idx:" or "index:" namespace are EA versions that are taken directly from the database itself. So for example you can show the MD5 checksum for resulting files by using idx:md5 as the result column. This is very handy for checksums and the like but also handy when you don't actually want to go and touch the original file at all to present results. There are still a few little changes to be made for full, totally offline, removable SATA drive index result presentation but things are very close to that level now.

Also checkout the apps/phpsearchinterface directory in the latest libferris release for two versions of a web interface to libferris searching. The first is a simple example that uses XSLT on client side to present XML search results to the user. The second example uses an AJAX interface together with the dhtmlxSuite grid control (not included) to present a nicer, more modern interface. These two clients are just examples and are in their infancy but they do give (particularly the latter example) an idea of how libferris can be used on a LAN environment for index searching. Think "libferris Intranet search" ;-)