# Rails 3.2 what are the best gems for full-text search in sql db?

**URL:** <https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630>\
**Category:** Rails\
**Created:** [October 11, 2012, 7:45pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630 "2012-10-11T19:45:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 11, 2012, 7:45pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/1 "2012-10-11T19:45:44Z")

</div>

there are a lot of solutions , some gems requiring a separate server  
setup…

I need to search for occurrences of some 'text in multiple columns  
( :name; :email, :description, …)

Should I actually setup a SOLr server ?

thanks for feedback

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 11, 2012, 11:30pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/2 "2012-10-11T23:30:43Z")

</div>

Thanks , seems to be only for Postgres… I’m using MySQL… Testicle  
seems to be inetresting Oh sorry … Texticle

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 12, 2012, 4:17am UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/3 "2012-10-12T04:17:35Z")

</div>

On Fri, Oct 12, 2012 at 3:44 AM, Erwin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> there are a lot of solutions , some gems requiring a separate server  
> setup…
> 
> I need to search for occurrences of some 'text in multiple columns  
> ( :name; :email, :description, ..)
> 
> Should I actually setup a SOLr server ?

I find sphinx easier to setup than Solr. If you’re going to try sphinx,  
you can use thinking sphinx to setup your indexes.

> 

–

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 12, 2012, 4:13pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/4 "2012-10-12T16:13:58Z")

</div>

On Thursday, 11 October 2012 13:45:02 UTC-4, Erwin wrote:

> there are a lot of solutions , some gems requiring a separate server  
> setup…
> 
> I need to search for occurrences of some 'text in multiple columns  
> ( :name; :email, :description, ..)
> 
> Should I actually setup a SOLr server ?

Depending on what you’re looking for, Sunspot may be useful - I’ve used  
it  
for a number of projects that needed full-text seach + filtering etc.  
There’s a Railscast that should help you get started:

[http://railscasts.com/episodes/278-search-with-sunspot](http://railscasts.com/episodes/278-search-with-sunspot)

–Matt J.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 11, 2012, 7:52pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/5 "2012-10-11T19:52:10Z")

</div>

On Thu, Oct 11, 2012 at 12:44 PM, Erwin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> there are a lot of solutions , some gems requiring a separate server  
> setup…
> 
> I need to search for occurrences of some 'text in multiple columns  
> ( :name; :email, :description, ..)

> **[GitHub - Casecommons/pg\_search: pg\_search builds ActiveRecord named scopes that...](https://github.com/Casecommons/pg_search)**
>
> pg\_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search

[http://tenderlove.github.com/texticle/](http://tenderlove.github.com/texticle/)

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 12, 2012, 11:42pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/6 "2012-10-12T23:42:50Z")

</div>

On Fri, Oct 12, 2012 at 8:24 AM, Jordon B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > Depending on what you’re looking for, Sunspot may be useful

> I’m gonna definitely second this suggestion if you don’t have PG. I still  
> somewhat like PG to save some money but I love working with solr

What does that last sentence mean? Solr is FOSS.

–  
Hassan S. ------------------------ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[Hassan Schroeder | about.me](http://about.me/hassanschroeder)  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 12, 2012, 5:27pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/7 "2012-10-12T17:27:39Z")

</div>

On Friday, 12 October 2012 09:12:45 UTC-5, Matt J. wrote:

> Depending on what you’re looking for, Sunspot may be useful - I’ve used it  
> for a number of projects that needed full-text seach + filtering etc.  
> There’s a Railscast that should help you get started:
> 
> [http://railscasts.com/episodes/278-search-with-sunspot](http://railscasts.com/episodes/278-search-with-sunspot)

I’m gonna definitely second this suggestion if you don’t have PG. I  
still  
somewhat like PG to save some money but I love working with solr when I  
have the chance and I would definitely choose it for a project with  
sunspot.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 13, 2012, 7:10am UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/8 "2012-10-13T07:10:19Z")

</div>

I’ve been using pg\_search, so I could do full text search on Heroku  
_for free_ (vs. paying for their WebSolr or other full text search  
add-ons). However, that has some serious problems, but I’ve figured  
out some workarounds, and made slides for a lightning talk. They’re  
available at:

[Full text search on Heroku -- for FREE!](https://www.slideshare.net/dare2xl/full-text-search-on-heroku-for-free/)

-Dave

–  
Dave A., T. Rex of Codosaurus, LLC… aka  
Available Secret-Cleared Ruby/Rails Freelancer  
(NoVa/DC/Remote); see [http://www.Codosaur.us/](http://www.Codosaur.us/).

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 13, 2012, 2:03pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/9 "2012-10-13T14:03:18Z")

</div>

On Fri, Oct 12, 2012 at 7:12 PM, Jordon B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > What does that last sentence mean? Solr is FOSS.
> 
> It means what it means. Obviously you think that Solr runs on Unicorn  
> farts and not on servers, that or you think that servers are free.

I think that Solr runs on a server, and from my experience, runs just  
fine on the _same_ server on which the web server stack is running –  
hence my confusion why using it should mean extra expense.

## YMMV.

Hassan S. ------------------------ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[Hassan Schroeder | about.me](http://about.me/hassanschroeder)  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 13, 2012, 4:13am UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/10 "2012-10-13T04:13:19Z")

</div>

On Fri, Oct 12, 2012 at 4:40 PM, Hassan S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What does that last sentence mean? Solr is FOSS.

It means what it means. Obviously you think that Solr runs on Unicorn  
farts and not on servers, that or you think that servers are free.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [October 14, 2012, 2:29pm UTC](https://www.ruby-forum.com/t/rails-3-2-what-are-the-best-gems-for-full-text-search-in-sql-db/223630/11 "2012-10-14T14:29:26Z")

</div>

Because not everyone has access to his own full featured server. Some  
have  
to rent every tiny component from services like heroku. So that’s where  
the  
extra expenses come from.  
Am 13.10.2012 14:01 schrieb “Hassan S.”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
