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
rails>>
class Article < ActiveRecord::Base
acts_as_searchable
end
Article.similarity_search(target_article, :limit => 5)
<<--
posted by
genki on Thu 29 Nov 2007 at 23:37 with 0 comments