[Xapian-discuss] patch proposal: omindex library or daemon

Liam xapian at networkimprov.net
Mon Oct 24 07:30:06 BST 2011


On Sun, Oct 23, 2011 at 10:44 PM, James Aylett <james-xapian at tartarus.org>wrote:

> On 23 Oct 2011, at 22:31, Liam wrote:
>
> > So we need to define the header file for this library... Would a subclass
> of
> > WritableDatabase make sense? I like the fact that omindex both converts a
> > file and inserts its text.
>
> I'd have thought to get it started you'd just make the existing functions
> that omindex uses internally available externally via the library, so it's a
> helper function which, given a file and options, returns a Xapian::Document
> that you can write into the database. The current model for Xapian is that
> way round, rather than WritableDatabase making and inserting a Document in
> one go.
>

Ah, right; still coming up to speed here. I suppose you could wrap it in a
MimeDocument subclass? But a pure helper function would be fine.

The omindex routines currently depend on a global Database variable, I
believe? Maybe that's not an issue for the lib tho...


More information about the Xapian-discuss mailing list