15

I have heard about Lucene a lot, that it's one of the best search engine libraries in Java. Is there any similar (as powerful) library for Ruby?

maerics
  • 151,642
  • 46
  • 269
  • 291
RubyDubee
  • 2,426
  • 2
  • 23
  • 34

5 Answers5

21

Well, there's Ferret, which is a port of Lucene to Ruby. Also, Lucene is very easy to use from JRuby, if that's an option for you.

Depending on your needs, you might also want to take a look at Solr, which is a higher-level front-end built on Lucene. There is a Ruby interface, solr-ruby, that interacts with Solr via HTTP.

Dave Ray
  • 39,616
  • 7
  • 83
  • 82
  • A few people have recommended [sunspot](http://sunspot.github.io) to me, which builds upon RSolr, but I have not personally tried it. – Dave Sag Jul 30 '15 at 00:58
6

Ferret is what you're looking for:

"Ferret is a high-performance, full-featured text search engine library written for Ruby. It is inspired by Apache Lucene Java project."

RichieHindle
  • 272,464
  • 47
  • 358
  • 399
  • 2
    Well you surely can put the high-performance in question. I find it deadly slow. – Lothar Aug 23 '09 at 15:29
  • 1
    Can you share any performance numbers? Like x seconds to return a search over y documents/rows/whatever? – Mike Buckbee Aug 23 '09 at 19:17
  • 1
    I have no personal experience with Ferret, but judging by what I've read and this page: http://ferret.davebalmain.com/trac/wiki/MyFirstBenchmark it used to be slow but is now comparable with Java Lucene. There are performance numbers on that page. YMMV. – RichieHindle Aug 23 '09 at 19:24
2

I would try one of them in combination with sphinx.

Thinking Sphinx http://freelancing-god.github.com/ts/en/rails3.html

Riddle http://riddle.freelancing-gods.com/

http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html

Nick
  • 2,393
  • 13
  • 22
chris
  • 1,245
  • 1
  • 10
  • 22
1

CLucene is a cross-platform C++ port of Lucene. It can be wrapped and used also from every high-level language (there are also a few legacy Swift projects you could start with). See:

http://sourceforge.net/projects/clucene

http://clucene.git.sourceforge.net/git/gitweb.cgi?p=clucene/clucene;a=summary

synhershko
  • 4,472
  • 1
  • 30
  • 37
0

unfortunately, in most cases, ferret is not what you're looking for, it's got recurring issues with re-indexing speed, index corruption and segfaults on the server. I think most people are going to SOLR, sphinx, and Xapian. I recall seeing some Tsearch / postgres apps mentioned, Tsearch seems to be a industrial-strength solution

Take a look here

Full Text Searching with Rails

Community
  • 1
  • 1
Gene T
  • 5,156
  • 1
  • 24
  • 24