[Xapian-devel] ANN: Alpha Ruby bindings for Xapian now available

Paul Legato plegato at nks.net
Wed Apr 19 21:55:35 BST 2006


Dear Xapian community,

We've been looking for a search engine to integrate with our Rails 
applications. Xapian seems to be the most robust and mature of any open 
source solution out there. But, there were no Ruby bindings. So... I've 
started work on Ruby SWIG bindings for Xapian.

My work is still alpha-quality; expect bugs and expect API changes 
before we're done. It's definitely not ready for production just yet. 
But, it is a solid base for going forward. The current version is 
available under the GPL via anonymous Subversion at:

   https://nks-svn-001.nks.net/xapian-bindings/

This code base is drawn from the latest stable tarball. There are a few 
minor changes to xapian.i, and a new ruby/ subdirectory. There is a 
smoketest.rb which implements the tests from the Python and PHP 
smoketests using the standard Ruby unit testing framework. Currently, it 
reports 14 tests, 20 assertions, 2 failures, and 8 errors. The code 
compiles as of revision 209.

There is still a lot to be done to make this binding production ready. I 
am no SWIG expert, so please let me know if there is an easier/better 
way to do things than what I've done. I've been drawing heavily from the 
Python and PHP util.i files.

Right now, I am working on wrapping the Iterator classes in such a way 
that they can be accessed according to the Ruby idiom (i.e. as an 
Enumerable with each{}). The Ruby wrapper's compilation is not yet 
integrated with the automake system used by the other bindings; I've 
been building manually with the included rebuild.sh script. Some of the 
various Xapian methods show up in the list of available autocomplete 
methods in irb, but throw a "NoMethodError: undefined method" if you 
actually call them. A few iteration-type methods (next(), prev()) 
segfault if you iterate past the end of a sequence.

I will be in #xapian on irc.freenode.net if anyone wants to discuss. Any 
suggestions, testing, feedback, or (especially) code contributions are 
welcome!

Best,
Paul

-- 

--------------------------------------------------
--    Paul Legato, Senior Software Engineer     --
---       Networked Knowledge Systems          ---
----   P.O. Box 20772 Tampa, FL. 33622-0772   ----
----- (813)594-0064 Voice  (813)594-0045 FAX -----
------           plegato at nks.net            ------
--------------------------------------------------


--------------------------------------------------
-----   This email bound by the following:   -----
---- http://www.nks.net/email_disclaimer.html ----
--------------------------------------------------




More information about the Xapian-devel mailing list