# Ferret, boost, etc

**URL:** <https://www.ruby-forum.com/t/ferret-boost-etc/86354>\
**Category:** Rails\
**Created:** [February 21, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/ferret-boost-etc/86354 "2007-02-21T18:15:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![technodolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Post date:** [February 21, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/ferret-boost-etc/86354/1 "2007-02-21T18:15:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![technodolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Post date:** [February 21, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/ferret-boost-etc/86354/2 "2007-02-21T18:57:15Z")

</div>

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](http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial)

---

<div class="post-metadata">

**Author:** ![technodolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Post date:** [December 4, 2007, 12:14am UTC](https://www.ruby-forum.com/t/ferret-boost-etc/86354/3 "2007-12-04T00:14:58Z")

</div>

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](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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![technodolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e99b99/32.png) [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Post date:** [February 21, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/ferret-boost-etc/86354/4 "2007-02-21T20:36:46Z")

</div>

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](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.
