开发者

Text Search for Rails 3 on Heroku - Texticle vs acts_as_tsearch vs acts_as_indexed

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_index开发者_开发问答ed

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!


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜