# Boosting individual token possible?

**URL:** <https://www.ruby-forum.com/t/boosting-individual-token-possible/184627>\
**Category:** Ferret\
**Created:** [March 5, 2010, 11:33am UTC](https://www.ruby-forum.com/t/boosting-individual-token-possible/184627 "2010-03-05T11:33:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![parkurm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@parkurm](https://www.ruby-forum.com/u/parkurm)\
**Post date:** [March 5, 2010, 11:33am UTC](https://www.ruby-forum.com/t/boosting-individual-token-possible/184627/1 "2010-03-05T11:33:29Z")

</div>

Hi guys,

Situation: There’re lots of pages, and each is attached with certain  
number of tags. It’s quite similar to [delicious.com](http://delicious.com). For example, the  
following is a list of pages and their tags, the tag number marked in  
the parenthesis.

page1: tag1(5) tag2(3) tag3(1) …  
page2: tag1(1) tag2(2) tag3(4) tag4(2) …  
page3: …

So, for page 1, it’s tagged by ‘tag1’ for 5 times, ‘tag2’ for 3 times,  
and ‘tag3’ only once.

Now I want to search for pages by giving a set of tags. Unlike  
traditional search, I want to differentiate the given tags by assigning  
weights. Here’s what it looks like:

Search query: tag1(2) tag3(1)

So it means I value ‘tag1’ more than ‘tag3’. Thus by firing this search,  
page1 shall be ranked higher than page2.

By looking at ferret documentation, I found it’s capable of boosting  
individual fields, or boosting individual documents, but it seems it’s  
unable to boost by individual tokens. Is that really the case? If so,  
can anybody point out how can I implement the idea shown above?
