acts_as_searchable is one of the most useful plugins which's enabling us to add a fulltext search feature to our models/resources easily.

Unfortunately, it is lacking an interface to the features of searching by similarity provided by HyperEstraier.

So I wrote some codes to add an interface to exploit it. This is acts_as_searchable_with_similarity.

How to use?

Here is an example.

app/models/article.rb

   1  class Article < ActiveRecord::Base
   2    acts_as_searchable
   3  end
   4  
   5  Article.similarity_search(target_article,  :limit => 5)

posted by Png genki on Thu 29 Nov 2007 at 23:37

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry232
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ