9

I am building a Rails 3 application that will be hosted on Heroku.

To implement full text search, these are the free alternatives that I have come across:

Texticle

acts_as_tsearch

acts_as_indexed

My application is going to be data intensive with a lot of read and writes. Search is also going to be used a lot.

Search is going to be across different models.

Which one will be the best in terms of performance and scaling?

Are there any other free and better alternatives?

Is it better to go for a IndexTank or WebSolr (that Heroku recommends) instead?

Thanks in advance!

Grant Hutchins
  • 4,275
  • 1
  • 27
  • 32
Nirav Shah
  • 689
  • 6
  • 16
  • 9
    I can only really comment on acts_as_indexed as I am the developer of it. In terms of scaling, AAI never achieves consistency with more than one Heroku Dyno, since they do not have a shared filesystem. This has not been a problem for most people, but could be an issue in certain situations. If you want real scalability on Heroku then IndexTank and WebSolr are the way to go. – Douglas F Shearer Apr 19 '11 at 11:23
  • Thanks Douglas for your response. Is it possible that I use acts_as_indexed to begin with? When I want my application to scale, I switch to IndexTank or WebSolr? – Nirav Shah Apr 20 '11 at 11:30
  • Yes, this is what I normally recommend to people. – Douglas F Shearer Apr 20 '11 at 13:19
  • Haven't tried the rest, but I use Websolr and it's working good. They had few minor issues every now and then, but it seems to becoming more solid. – Bashar Abdullah Jul 27 '11 at 06:48
  • Might be worth considering IndexTank or WebSolr if your search requirements are more than just text. IndexTank for instance allows you to add parameters to the index so you can do things like geolocate your search results. If it's just text search, then I guess any postgres FullTextSearch would probably be fine. – BlueFish Sep 08 '11 at 14:23

4 Answers4

12

Have you tried PgSearch https://github.com/Casecommons/pg_search? Since heroku uses pg, you actually get full text search for free, and PgSearch builds named scopes that take advantage of PostgreSQL’s full text search.

user1053134
  • 123
  • 1
  • 6
1

You can use PostgreSQL's built-in full text search, but it's a pain, but there are gems such as pg_search to make it a lot easier, but that one has some serious problems, but I've figured out easy workarounds. See https://docs.google.com/presentation/d/1NbN0kJMJsSQW2N7ItNMB6VuM_lJok-Xb0epk0anbRIo (slides from my lightning talk titled "Full Text Search on Heroku for FREE") for details.

0

I would recommend using WebSolr. It is an enterprise level search system based on Apache Solr, which can handle millions of indexed documents without breaking a sweat. Furthermore, Solr allows you to define a bespoke structure to you data, rather than forcing you down the line of a simple FULLTEXT search. It offers extra features such as faceted searching and spelling correction.

If you do not want to pay for Solr, you can host it yourself, as it is open source: http://lucene.apache.org/solr/

With regards to the alternatives you mentioned, if you are doing a substantial amount of searching, I would not use anything that relies on your application database to do fulltext search- that is a very amateur solution which does not scale.

cjm2671
  • 18,348
  • 31
  • 102
  • 161
0

Heroku recommends using an add-on to provide full-text search. This provides you with the best performance, scalability, and ease-of-use for your application. There are two add-ons for full text search: IndexTank and Websolr.

Luca G. Soave
  • 12,271
  • 12
  • 58
  • 109
  • Indextank link is no longer operational, i also cannot find IndexTank in Heroku addons list, did they take it down, or did they change their name? I also do not seem able to reach their website. – Cninroh Nov 09 '12 at 12:47