Ferret, boost, etc

I’m intending to use acts_as_ferret on one of the sites I’m currently
developing… is there any way to do a dynamic kind of boost thing:
wherein a user could specify which of certain pieces of information were
more important to them, and I could tell it to boost those attributes in
the actual search, instead of just declaring it in the model file?

Luke I. wrote:

I’m intending to use acts_as_ferret on one of the sites I’m currently
developing… is there any way to do a dynamic kind of boost thing:
wherein a user could specify which of certain pieces of information were
more important to them, and I could tell it to boost those attributes in
the actual search, instead of just declaring it in the model file?

http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial

Luke,
I have similar needs and was wondering if this ever got answered?

So basically, one user may search and say that title of the post is
most important to them, but another user may think that a match in the
content field is more important. All I can find in the docs is how to
set the importance globally, for anyone using the Model class.
Ideally, I’d like to be able to say:

Post.find_by_contents “bladder control”, :boost => {:title =>
1, :content => 2}

which would be a different order than:
Post.find_by_contents “bladder control”, :boost => {:title =>
2, :content => 1}

Can anyone shed some light on this for me? I have read
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial
and done a fair share of googling on this.

/Shawn

On Feb 21, 11:36 am, Luke I. [email protected]

Drew O. wrote:

Luke I. wrote:

I’m intending to use acts_as_ferret on one of the sites I’m currently
developing… is there any way to do a dynamic kind of boost thing:
wherein a user could specify which of certain pieces of information were
more important to them, and I could tell it to boost those attributes in
the actual search, instead of just declaring it in the model file?

http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial

I’ve read that: it shows how to use boost as a parameter when declaring
what columsn to index in your model.rb file, but it doesn’t say anything
(at least, that I see, although I could just be missing it) about using
that as a paremeter to a search.