Plugins - Acts as Clusterable
Add to favoritesThis plugin makes it very easy to cluster active record objects. It can be used for grouping search results (see a similar example http://demo.carrot-search.com/carrot2-webapp/main).
This plugin requires the clusterer Ruby gem.
Add the following lines to your model:
acts_as_clusterable :fields => ['title','text']
if no fields are given then it will use all text and string fields present in the model. Now, doing clustering is as easy as:
clusters = Joke.cluster(:algorithm => :hierarchical)
By default the number of clusters is Math.sqrt(no. of objects), so to get custom no. of clusters give, the no. of clusters as an argument, i.e.,
clusters = Joke.cluster(:algorithm => :hierarchical, :no_of_clusters => 2)
http://cuttingtheredtape.blogspot.com/2006/08/actsasclusterable.html
http://clusterer.rubyforge.org/svn/rails-plugins/acts_as_clusterable/
Rails' (MIT)
Searching and Queries

The SVN url has been updated.
This plugin took a while to get working, and I still don't have it all set, so I ahven't voted yet. Beaware that the README on how to us it is inaccurate.. Look at the clusterabletest.rb test for a better example. Also, teh repository listed up there is incorrect, it is now on a rubyforge site: http://clusterer.rubyforge.org/svn/rails-plugins/actsas_clusterable/