Paul Legato
2006-Apr-19 20:55 UTC
[Xapian-devel] ANN: Alpha Ruby bindings for Xapian now available
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 ---- --------------------------------------------------
Olly Betts
2006-Apr-19 21:55 UTC
[Xapian-devel] ANN: Alpha Ruby bindings for Xapian now available
On Wed, Apr 19, 2006 at 05:55:35PM -0300, Paul Legato wrote:> 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.Ooh, excellent. I was putting together a list of potential projects for people who might be interested in getting involved in Xapian development only two days ago, and Ruby bindings was one of the 6 things I came up with: http://wiki.xapian.org/HelpWanted Incidentally, feel free to add more entries, but bear in mind this is intended for people who don't know Xapian's internals intimately (but we could have a separate page listing those if it seems useful), and please don't use it just to pimp your pet wishlist item!> 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.I've had a quick look. The main thing I can probably help you with right now is slotting it into the build system so you can just type "make" to rebuild it!> I will be in #xapian on irc.freenode.net if anyone wants to discuss. Any > suggestions, testing, feedback, or (especially) code contributions are > welcome!OK, I might try to find you a bit later. Cheers, Olly