Full-Text Rails 3 Search

I evaluate full-text search methods for ATM Rails 3. Does anyone have a recommendation? It seems to me that most of the known methods (Sunspot, Sphinx, Ferret, Xapian) arent ready for Rails 3. Is this so? At the moment, I had a lot of resources left on the machine, and Id wanted to deploy my application, but, nevertheless, Id would like to keep the load idle for the search engine as low as possible. I plan on using PostgreSQL if that matters.

After some reading, Im pretty sure Id like to use Sunspot or Xapian. But if you have any other (and better) solution, tell me :-) Especially with regard to Sunspot Im not sure if it was wise to have a complete Tomcat that works in addition to my Rails application. Does anyone have experience in this constellation?

Thanks in advance, Ulf

+6
ruby-on-rails-3 full-text-search sunspot xapian
source share
4 answers

If you use PostgreSQL, you can get a huge portion of your built-in text search capabilities before you need to use external libraries. I have been using tsearch queries with great results for many years.

Full-text search PostgreSQL analyzes the proximity of a word to calculate relevance and ranking and offers useful features such as highlighting search results .

He also knows the rules for normalizing the language, for example, he knows that to ignore the suffixes s and es pluralization in English; therefore, a search for โ€œcountryโ€ will also display results for โ€œcountries,โ€ just like Google.

I do not suggest that you do not use the libraries you mentioned, but it is worth examining the database to see if most, if not all of your requirements are already met.

+6
source share

You can use sunspot with Rails3, no problem. We did this successfully using the sunspot / sunspot_rails gems (1.2.rc4). And itโ€™s not too much trouble to run Solr on the Tomcat server.

+1
source share

For full-text search, you must use a search engine. For example, you can use the Lucene library with jRuby. If you want to stay with standard Ruby (cRuby), you can use Solr.

There are also some Solr plugins for rails: For example, starting at http://wiki.apache.org/solr/SolRuby might be a good idea.

0
source share

Sunspot is ready to work with Rails3, we already use it in several Rails3 applications. I had great success with Solr and Sunspot. So much so that we start a blog on it

0
source share

All Articles