Lukas Rieder
2009-Jan-29 08:11 UTC
[Xapian-devel] Xapian Ruby bindings do not implement full multi-value-sorting functionality?
Hello, this is a question that could be answered by collaborators of the Ruby bindings. Today I've played around with the Xapian::MultiValueSorter class. I've set everything up and then I tried following on an instance of Xapian::Enquire: : enquire = Xapian::Enquire.new(database) enquire.query = options[:query] : sorter = Xapian::MultiValueSorter.new sorter.add(0, true) sorter.add(1, true) : enquire.sort_by_key_then_relevance(sorter) : And it seems that there is no 'sort_by_key_then_relevane' method implented in Xapian::Enquire. The documentation tells me: http://www.xapian.org/docs/apidoc/html/classXapian_1_1Enquire.html#7c6c0c1f66bdeefbd09a0575584ba9b9 Is there a reason for this? How could it be implemented into the Ruby bindings? I've read the HACKING document that comes with the xapian-bindings but I've never used SWIG, I wasn't able to help myself. Any help is highly appreciated. Lukas Rieder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20090129/07343bbc/attachment-0001.html>
Richard Boulton
2009-Jan-29 09:35 UTC
[Xapian-devel] Xapian Ruby bindings do not implement full multi-value-sorting functionality?
On Thu, Jan 29, 2009 at 09:11:49AM +0100, Lukas Rieder wrote:> this is a question that could be answered by collaborators of the Ruby > bindings....> enquire.sort_by_key_then_relevance(sorter) > > And it seems that there is no 'sort_by_key_then_relevane' method implented > in Xapian::Enquire.> Is there a reason for this? How could it be implemented into the Ruby > bindings?Which version of Xapian are you using? Enquire::set_sort_by_key_then_relevance() was added to the SWIG bindings on Nov 29th 2007, and included in releases of xapian from 1.0.5 onwards. I've not checked that it works in the Ruby bindings, but it's certainly present in the generated xapian_wrap.cc file for Ruby. -- Richard