[Xapian-discuss] allterms_begin(prefix) on a WritableDatabase
Olly Betts
olly at survex.com
Fri Feb 15 11:35:28 GMT 2008
On Thu, Feb 14, 2008 at 07:35:24PM +0000, Matthew Somerville wrote:
> Is there any reason that, in the Perl bindings, the allterms_begin/end in
> Search::Xapian::WritableDatabase do not allow a prefix, while those in
> Search::Xapian::Database do?
Not a good reason. I just only updated one version of the wrapper.
Ideally, the Search::Xapian::Database methods would be automatically
inherited by Search::Xapian::WritableDatabase, but that doesn't seem to
happen. I don't know if this is just how XS works, or if we're doing
something wrong.
I'm hoping we can move Search::Xapian to use SWIG at some point, but
that needs SWIG to support "directors" for Perl, which is doesn't yet.
There is a somewhat dated patch though.
> I'm happy to supply a patch if that's helpful
Yes, that would be handy. A small regression test would be useful
too (assuming there's one for Database, just repeating that for
WritableDatabase would be fine.
> although it wouldn't be any more than
> copying the relevant prefix bits from the Search::Xapian::Database section
> as I'm no XS expert :-)
That's the way to do it, unless we can persuade it to inherit.
Cheers,
Olly
More information about the Xapian-discuss
mailing list