Casecommons/pg_search — Issue #18: Display ranking
Author: elfassy
Created: 2011-11-01 15:41:33+00:00
State: open

source http://tenderlovemaking.com/category/computadora/texticle/

Texticle has one neat feature

>> Article.search('like').map { |x| x.rank }
=> ["0.4", "0.4"]
>> Article.search('coffee').map { |x| x.rank }
=> ["1.4"]

This allows more flexibility in ranking (say i want to give a bonus to all Articles posted in the last week, i could just do (article.rank + 0.1) and then sort again.

Can this be done with pg_search? If not, please add the .rank feature to the wishlist. Thanks!