Forum: Ferret Boosting individual token possible?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
413b75f36de910e218e320f3b9408d9c?d=identicon&s=25 Dongzhen Piao (parkurm)
on 2010-03-05 11:33
Hi guys,

Situation: There're lots of pages, and each is attached with certain
number of tags. It's quite similar to 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?
This topic is locked and can not be replied to.