On Wed, Oct 28, 2009 at 03:58:32PM +0100, Niels Boldt
wrote:> However, we would like to store the resulting index in a database in a blob
> instead of storing the index in a file on the filesystem. However we have
> problems implementing that solution. The only way we have found so far is
to
> write the index to a file and then copy this file into the database which
> seems a bit akward.
>
> Isn't there any way to make this a bit smarter. We haven't found
any
> serializeable functions etc on WriteableDatabase
The isn't currently a way to tell the disk-based backends to store stuff
other than in files in a specified directory. The "InMemory" backend
isn't
what you're after for sure - it was originally written for development and
testing, and while it can be useful, it has performance issues in some cases if
fed a lot of data. At some point it's likely to get replaced with a version
of the disk-based backend adapted to use memory instead of disk.
Eric B. Ridge looked at doing something similar to you with PostgreSQL some
time ago (when quartz was the current disk-based backend, but the same
issues apply with flint and chert too). There are threads about it on both
the Xapian and PostgreSQL lists, but this is a good one to start with I
think:
http://thread.gmane.org/gmane.comp.search.xapian.general/368
Cheers,
Olly