[Xapian-devel] ruby bindings odds and ends

James Aylett james-xapian at tartarus.org
Thu May 11 15:13:16 BST 2006

On Thu, May 11, 2006 at 03:07:28PM +0100, Olly Betts wrote:

> This actually wraps a TermIterator not an MSetIterator (it wraps
> Enquire::get_matching_terms_begin() and ..._end()) - the real oddity is
> that none of the other sources of TermIterators get similar treatment.
> I can understand that you probably don't want to suck the terms from
> Database::allterms_begin() into an array but there are other places
> which generally return a modest number of terms.

Oops, mistook quite what it was doing. How odd.

> I suspect whoever added it just had a need to see the terms matching
> each document in the MSet and found using the C++ iterators from
> whatever language it was clumsy.


> But as you say, we really want to wrap as whatever the native equivalent
> of an iterator is where we can.  I believe that currently Python, C#, and
> Ruby wrap as native-style iterators, and PHP5 should soon.  I think Java
> does too, but I've not looked at that so much.

That sounds about right. Are we using SWIG for Java yet, or still the
hand-crafted bindings?


  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org

More information about the Xapian-devel mailing list