[Xapian-devel] C# bindings and string typed return values

James Aylett james-xapian at tartarus.org
Thu Mar 31 14:52:52 BST 2011


On 31 Mar 2011, at 13:38, Greg wrote:

> On a slightly different topic I was trying to implement a 'Relevant
> Items' search using ESet and RSet one snag I came upon was that the
> Query constructor in C#, namely the Query constructor that has the
> Query.op parameter expects SWIGTYPE_p_std__vectorT_Xapian__Query_t
> type next which I'm assuming is supposed to be an array of Queries.
> However I can't really create anything of a kind, I've seen multiple
> examples in perl and python but those seem to have bindings that allow
> passing the iterators etc.


The python bindings have some specific code to handle this case smoothly; I suspect that the C# ones as yet do not. I believe it "just" needs an appropriate SWIG typemap implementing so that suitable C# lists can be converted into a vector<Xapian::Query> before passing to the internal C++ constructor.

(For anyone who's applying for the GSoC "improve existing bindings" project idea, this is exactly the sort of thing we'd like to add support for!)

J

-- 
 James Aylett
 talktorex.co.uk - xapian.org - devfort.com




More information about the Xapian-devel mailing list