Which Ruby wrapper should I use?
If you want to access Xapian from Ruby, there are several wrappers available.
Xapian's own Ruby bindings
These bindings are a (largely automatic) translation of the C++ API into Ruby, with methods renamed to follow Ruby conventions. Some features (such as iterators) have been wrapped specially to give a more natural interface. Most of the interface simply mirrors the C++ API, and can be slightly clumsy to use from Ruby. There is currently little documentation specific to the Ruby bindings, but the C++ API documentation gives a good overview. The bindings allow complete access to all of Xapian's features.
All the other known Xapian Ruby wrappers are implemented on top of these bindings, so you will need to install them even if you plan to use a higher level interface. The API is stable, and follows the same deprecation policy as Xapian's C++ API to ensure a reasonably easy upgrade path between releases.
xapian-ruby gem
https://rubygems.org/gems/xapian-ruby is a gem of Xapian's Ruby bindings, including a private build of xapian-core (the C++ library).
It seems to be regularly updated with new Xapian releases (as of early 2025 at least). If you want a gem of Xapian's Ruby bindings, this currently seems the best option.
xapian-core gem
The confusingly-named "xapian-core" gem actually contains Xapian's Ruby bindings plus a private build of xapian-core (the C++ library). It seems to be abandoned as the Xapian version is still 1.4.6 (released 2018-07-02) - at least from the current release branch, but very out of date now.
We don't recommend using this gem.
xapian-full gem
https://rubygems.org/gems/xapian-full is also a gem of Xapian's Ruby bindings, and also includes a private build of xapian-core. However, it is painfully out of date (it packages 1.2.3 which was released 2010-08-24), and all previous versions were of the 1.1.3 development snapshot (we do not recommend packaging development snapshots unless they are clearly marked as such, which it wasn't in this case).
We really don't recommend using this gem.
xapian-full-alaveteli gem
https://rubygems.org/gems/xapian-full-alaveteli is a fork of the xapian-full gem by a frustrated xapian-full user. However, updates are erratic and infrequent. Currently bundles xapian 1.4.22 (which was released 2023-02-02).
We don't recommend using this gem.
xapian-fu
https://github.com/johnl/xapian-fu/tree/master
From the README:
XapianFu is a Ruby library for working with Xapian databases. It builds on the GPL licensed Xapian Ruby bindings but provides an interface more in-line with "The Ruby Way"(tm).
There is a useful introductory blog article about Xapian Fu.
xapian-fu no longer seems to be actively maintained (last update was 2020-03-22).
xapit
https://github.com/ryanb/xapit/tree/master
From the README:
Xapit (pronounced "zap it") is a high level interface for working with a Xapian database.
Note: This project is early in development and the API is subject to change.
Xapit seems to be aimed at Ruby on Rails.
This project was marked as "no longer maintained" on 2021-12-12.
CouchDB Xapian
CouchDB Xapian is a search interface to CouchDB documents, that uses the Ruby Xapian bindings.
This project was hosted on gitorious, but the link no longer works. It doesn't seem to have a new home.
dm-xapian
https://github.com/psq/dm-xapian/tree/master
dm-xapian is a Merb plugin to index your Ruby on Rails DataMapper models with Xapian. Seems to be a rewrite of/based on acts_as_xapian.
This article has more information:
http://blog.nanorails.com/articles/2008/9/24/index-your-datamapper-models-with-xapian
This project no longer seems to be actively maintained. Last update 2009-02-07.
acts_as_xapian
Acts as Xapian is a search plugin for Ruby on Rails.
It was originally developed by Francis Irving. There was some further work on it by others, but it now seems to be unmaintained.