Fwd: GoXapian

Olly Betts olly at survex.com
Mon Nov 5 21:04:23 GMT 2018


Dave Courtois wrote:
> Hi there just a little word to tell you that Xapian 1.4.6 work in
> Golang 1.9. There is some issue with the MSet ESet, the namespace part
> of the name is drop by swig. There is also some error with define
> macro in .i files, but with minor change all work perfectly. I made
> use of it as a search engine (and db), for my Javascript framework
> named CargoWebserver. Here is the link to the golang port,
> https://github.com/CargoWebServer/CargoWebServer/tree/master/Project/src/code.myceliUs.com/GoXapian
> <https://github.com/CargoWebServer/CargoWebServer/tree/master/Project/src/code.myceliUs.com/GoXapian>.

Good stuff.

> I can wrote some unit test as you want, do you have some already
> written for Java or C++... 

There are a lot of unit tests for the C++ bindings (in
xapian-core/tests/ in the source tree), but for the bindings which use
SWIG to automate the wrapping we haven't generally tried to reproduce
the same level of detailed coverage because if SWIG successfully wraps
one method it's likely to also successfully wrap other methods which use
the same types.

Instead we have some tests that basic functionality works and we also
try to make sure that any custom SWIG typemaps have test coverage.  Then
we add regression tests for any bugs fixed.  This approach seems to
have worked out well.

There are Java bindings tests (xapian-bindings/java/SmokeTest.java) but
I'd probably suggest looking at a couple of other languages' tests so
you don't end up getting sidetracked by any Java-specific quirks.

Cheers,
    Olly



More information about the Xapian-discuss mailing list