[Rails] Full-text search
Scott Barron
scott at elitists.net
Fri Dec 10 15:11:34 GMT 2004
On Fri, Dec 10, 2004 at 02:24:58PM +0200, Jarkko Laine wrote:
> Hi all,
>
> I'm interesting in ways people have incorporated any kinds of full-text
> search engines like OpenFTS (http://openfts.sourceforge.net/) with
> rails. Or do you use the built-in MySQL engine?
>
> If the latter, how does it perform? I've heard it can be painfully
> slow. Judging by the MySQL docs, one full-text index can only span one
> db table which doesn't sound really helpful for an app that has many
> different kinds of content.
>
> Any pointers? Ideas? Opinions?
>
I mentioned this to you on IRC, but I thought I'd post it up here real
quick. I've used the tsearch2 module for PostgreSQL in two of my
projects with some degree of success. I do have to break down into
find_by_sql when I want to utilize it, so I haven't done any real
integration with AR so to speak, but that method does work for what I
need it to do. It performs fine enough, I don't have any speed problems
without.
However, I would be interested in hearing about a more generic solution
that can work the same on boty MySQL and PostgreSQL. I'd like to add
full text search to both of my "public" rails projects but I don't want
to have to hack around different methods for pg vs mysql. I haven't
checked out OTFS, but I'll give that a look over. Any other ideas?
Just usign LIKE is OK, but, at least with tsearch2, you can get sexier
with rankings and relativeness, etc. I want sexification.
-Scott
More information about the Rails
mailing list