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? TIA, Jarkko -- Jarkko Laine http://jlaine.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
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
>>>>> "Scott" == Scott Barron <scott-HDQKq3lYuGDk1uMJSBkQmQ@public.gmane.org> writes:Scott> However, I would be interested in hearing about a more Scott> generic solution that can work the same on boty MySQL and Scott> PostgreSQL. I''d like to add full text search to both of my Scott> "public" rails projects but I don''t want to have to hack Scott> around different methods for pg vs mysql. I haven''t Scott> checked out OTFS, but I''ll give that a look over. Any Scott> other ideas? Just usign LIKE is OK, but, at least with Scott> tsearch2, you can get sexier with rankings and Scott> relativeness, etc. I want sexification. Hmm, I coded a simple LIKE solution for MySQL a while back: http://rubyonrails.org/show/FullTextSearch (go back one revision, latest one is screwed up). I really should generalize it to PostgreSQL/SQL92 (different LIKE semantics and escaping) and submit it as a patch. Not really what you are looking for, I know, but maybe still useful. Gleb