# Can boost change dynamically?

**URL:** <https://www.ruby-forum.com/t/can-boost-change-dynamically/113835>\
**Category:** Ferret\
**Created:** [September 5, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/can-boost-change-dynamically/113835 "2007-09-05T13:30:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![golak\_Sarangi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@golak\_Sarangi](https://www.ruby-forum.com/u/golak_Sarangi)\
**Post date:** [September 5, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/can-boost-change-dynamically/113835/1 "2007-09-05T13:30:45Z")

</div>

On Tue, Sep 04, 2007 at 06:33:20PM +0530, golak Sarangi wrote:

> - Hi,  
> _\>_  
> _\>_ I have got a peculiar requirement in my project. I need to apply  
> some boost  
> _\>_ to different fields of my index. But the problem is the boost that  
> needs to

_\>_ be applied is dynamic. It changes for everyrow of data.I am storing  
that in  
_\>_ the index itself while building it. Is there anyway by which i can  
add the  
_\>_ boost to search query while searching. at present am retreiving the  
whole

_\>_ set of searched result and then manipulating with the score to get  
the  
_\>_ output. but by that way it gets too slow. can any one help me.  
\*  
did you search the archives for this? Imho this topic came up a few days

(or weeks?) ago.

Short answer: \<ou can set the boost on a per document basis at indexing  
time, see the API docs for Ferret’s Document class.

Cheers,  
Jens

Hi jens  
I am indeed using Ferret’s Document class. But am not sure about the

calculation that ferret does to give me the output score. Although  
the output that  
i get is relevant enough but its like a black hole  
from outside. I tried to search for it from the C extension of ferret  
but lost track

of it at the msea\_search function. Could you please through some light  
on the  
calculation of score when am using boost for document as well as  
individual fields separately.

Thanks and Regards  
Golak

---

<div class="post-metadata">

**Author:** ![golak\_Sarangi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/3bc359/32.png) [@golak\_Sarangi](https://www.ruby-forum.com/u/golak_Sarangi)\
**Post date:** [September 5, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/can-boost-change-dynamically/113835/2 "2007-09-05T13:41:31Z")

</div>

On Wed, Sep 05, 2007 at 04:59:36PM +0530, golak Sarangi wrote:

> calculation that ferret does to give me the output score. Although  
> the output that i get is relevant enough but its like a black hole  
> from outside. I tried to search for it from the C extension of ferret  
> but lost track  
> of it at the msea\_search function. Could you please through some  
> light on the calculation of score when am using boost for document as  
> well as individual fields separately.

have a look at Ferret’s explain function, this will show you how the  
score of a result is calculated.

Jens

PS: your mail was pretty hard to read, please try to quote previous  
text correctly.  
[http://www.netmeister.org/news/learn2quote.html](http://www.netmeister.org/news/learn2quote.html)

–  
Jens Krämer  
webit! Gesellschaft für neue Medien mbH  
Schnorrstraße 76 | 01069 Dresden  
Telefon +49 351 46766-0 | Telefax +49 351 46766-66  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold, Hagen Malessa
