The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
A simple full-text search engine in 200 lines of Ruby

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
A simple full-text search engine in 200 lines of Ruby Posted: Nov 16, 2006 6:28 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: A simple full-text search engine in 200 lines of Ruby
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

I'd been planning to add full-text search capabilities to FastRI from the beginning, and in Ruby-land "full-text" means Ferret. But I wanted to keep dependencies to a minimum, as FastRI could someday aspire to replace parts of the agonizing ri in the stdlib. There had to be a middle ground between risearch's simplicity and slowness and Ferret's nuclear-powered nutcracker.

I decided to write a straightforward full-text engine using suffix arrays, and the very first (utterly na��ve) implementation was already fast enough for FastRI: taking ~10 seconds to index some 40 gems and the stdlib documentation, I was getting sub-millisecond query times. In a latter test, I indexed 20% of Linux' sources (why only 20%? because indexing was done in memory), which took half a minute, and queries were in the millisecond range. Not bad at all for a couple hundred lines of easy Ruby code.


Read more...

Read: A simple full-text search engine in 200 lines of Ruby

Topic: Designing a DSL Previous Topic   Next Topic Topic: Beginning Ruby on Rails E-Commerce: From Novice to Professional

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use