Matteo Zandi
2008-Dec-13 16:06 UTC
[Xapian-discuss] INCLUDE_QUERY_TERMS in get_eset function (python)
Hi all, is it possible to include query terms in the eset in python?
Olly Betts
2008-Dec-14 23:38 UTC
[Xapian-discuss] INCLUDE_QUERY_TERMS in get_eset function (python)
On Sat, Dec 13, 2008 at 05:06:10PM +0100, Matteo Zandi wrote:> From help(xapian.Enquire.get_eset), it seems that the only three parameteres > are maxitems, omrset and edecider, while in C it should be possibile to pass > Xapian::Enquire::INCLUDE_QUERY_TERMS to the get_eset function.You should be able to call it in the same way as you do in C++ (SWIG implements an "overload resolution" layer to take care of which version gets called). So it looks like the docstring is wrong here. Richard wrote the script which generates them, so is probably the best person to comment on that. Cheers, Olly
Richard Boulton
2008-Dec-15 14:38 UTC
[Xapian-discuss] INCLUDE_QUERY_TERMS in get_eset function (python)
Matteo Zandi wrote:> is it possible to include query terms in the eset in python? > > From help(xapian.Enquire.get_eset), it seems that the only three parameteres > are maxitems, omrset and edecider, while in C it should be possibile to pass > Xapian::Enquire::INCLUDE_QUERY_TERMS to the get_eset function. > > If it is not currently available, would it be possibile to have this > parameter also in the python bindings in future versions?This is a failing in the documentation comment - the feature is (I believe, but haven't double-checked) available in the python bindings. The problem is that the current way that we generate the python binding doccomments from the C++ documentation comments fails when a method has multiple overloaded forms - it just gives the documentation for the last overloaded form to occur in the C++ headers. I've not been trying to fix this because some work has been in progress on swig to make it possible to generate the documentation comments directly with swig, which should fix this problem and I didn't want to duplicate effort. The python bindings support pretty much everything that the C++ interfaces do, with the exceptions and differences as noted in the python bindings documentation file, and if the doccomments don't indicate this, it's probably for this reason. -- Richard