Topic: Adding FULLTEXT index to a table / acts_as_ferret

Hey there,

I'm trying to add a FULLTEXT index to one of my tables. For whatever reason, I can't get acts_as_ferret to work for me..

I'm using:

    execute("ALTER TABLE books ADD FULLTEXT KEY search_text (title, author)")

but the table isn't MyISAM, how do I convert the table to such?

OR

How do I get acts_as_ferret to work?
I downloaded the ferret gem, and installed the plugin with no errors, but when I use
acts_as_ferret in my model, it says

undefined local variable or method `acts_as_ferret' for Book:Class

I'd really like to get acts_as_ferret working, because it seems a little easier.
Although, when I do a search, it is going to be with joins... is that possible with acts_as_ferret?

Thanks a bunch.

Re: Adding FULLTEXT index to a table / acts_as_ferret

Install the acts_as_ferret plugin as well, then read the intro at davebalmain.com. You may find working with ferret indexes directly is more effective than acts_as_ferret.

Re: Adding FULLTEXT index to a table / acts_as_ferret

I meant to say I installed the acts_as_ferret plugin, not the ferret plugin.
I will take a look at davebalmain.com though.

Any reason it is giving me the error message? Do I have to install the ferret plugin too? Or is just having the gem there for acts_as_ferret enough? I've never used plugins before.

Re: Adding FULLTEXT index to a table / acts_as_ferret

You need to do:

gem install ferret
script/plugin install acts_as_ferret

Ferret works with or without Rails.

In the code that references acts_as_ferret, you may need to:

require 'ferret'