I have spent a couple hours researching the FerretOnRails and
acts_as_ferret
plugin, and am very pleased with what I see so far.
My question is how to have my application, with multiple models:
Speakers
Talks
News
etc…
With all varying :string and :text column types, to be able to use a
single
index by which I can produce a search on.
I will go through each of the models and add a acts_as_ferret :fields =>
[‘text_field’, ‘string_field’, ‘etc’] for each of the models so they are
indexed. But as far as storing the data in a way so that I can query it
with
a single action like ActiveRecord::find_by_content(‘search query test’),
would work great. I even seen a reference to the previous post, but
haven’t
yet figured out how to use this.
I read about the Typo integration, that has a Content model, which all
other
data models (Page, Comment, etc) extend and the
Content.find_by_content(@query) is used. This would work, however I do
not
want to have a “Core” model which is extended in that fashion. But
rather
have a acts_as_ferrett within each model, all referencing the same
index.
Then have one search page which queries them all, and links to the
controller/show/id for each record result.
Any ideas how I may use the acts_as_ferret to do this?
-Nb
Nathaniel S. H. Brown http://nshb.net