Brightbox
  • Home
  • Pricing & Sign up
  • Why Brightbox?
  • Products & Services
  • FAQs
  • About
  • Blog
  • Wiki
  • Contact
Blog RSS feed
POSTED BY

John Leach

john@brightbox.co.uk

twitter_banner

Recent Posts

  • New deployment gem release, better bundler support
  • Passenger 3.0.11 Ubuntu Packages
  • Brightbox Cloud - general availability
  • It's a new brand day!
  • Apache Denial-of-Service Vulnerability

Full Text Indexing in Ruby with Xapian Fu 1 Feb 10

I’ve just properly announced my Ruby full text indexing library, Xapian Fu, on my personal blog.  It’s a Ruby interface to Xapian, an open source search engine Library.  Xapian Fu basically gives you a Hash interface to Xapian – so you get a persistent Hash with full text indexing built in.

For example:

  require 'xapian-fu'
  include XapianFu
  db = XapianDb.new(:dir => 'example.db', :create => true,
                    :store => [:title, :year])
  db << { :title => 'Brokeback Mountain', :year => 2005 }
  db << { :title => 'Cold Mountain', :year => 2004 }
  db << { :title => 'Yes Man', :year => 2008 }
  db.flush
  db.search("mountain").each do |match|
    puts match.values[:title]
  end

The full announcement is here, github project here and rdoc here.  Hope you find it useful!

Posted 1 February 2010 by John Leach

ferret+ indexing+ library+ ruby+ search+ xapian+ xapian fu


Recent blog posts

  • New deployment gem release, better bundler support
    2 months ago
  • Passenger 3.0.11 Ubuntu Packages
    2 months ago
  • Brightbox Cloud – general availability
    4 months ago
  • It’s a new brand day!
    4 months ago
  • Apache Denial-of-Service Vulnerability
    5 months ago
  • Pricing for Brightbox Cloud (and last call for private beta)
    5 months ago

Join our email list

Flickr (more...)

RSS feeds

Blog feed

Flickr feed

Recent Wiki updates

System Status feed




Wiki | Forums | Terms & Conditions | Privacy | Site Map

Copyright © 2011 Brightbox Systems Ltd. All rights reserved