[Xapian-discuss] Accessing Query::Internal from SWIG

James Aylett james-xapian at tartarus.org
Thu Mar 30 15:05:59 BST 2006


On Thu, Mar 30, 2006 at 03:00:10PM +0100, Olly Betts wrote:

> > Internal classes don't get wrapped, but I can see why this would be
> > useful. We'd need to have serialise()/unserialise() on Xapian::Query
> > itself and wrap that - thoughts, Olly?
> 
> I've thought before that Query objects should be serialisable so they
> can (for example) be stored on disk and recreated easily.  Possibly
> other classes should be too, but a Query object is immutable once
> created, so it's a particular obvious candidate.

I think it's more useful because having Query objects you can suck off
disk / db / memory quickly means you can save exactly what you built,
even if there's no terribly good /single/ input format. So you might
have an input format, and then do something to it, and allow the user
to mix some other stuff - having a serialisable representation here is
easier than having to write your own.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list