Technology Musings

January 20, 2009

Features / I Dream of acts_as_tsearch2


Two plugins I would love to have for Ruby on Rails, and would love to build if I had the time:


This would be an ActiveRecord layer for integrating with PostgreSQL's tsearch2 full-text indexing.  Right now, I am not aware of a Rails plugin that does that.


This would take the results of multiple paginated queries and combine them together.  For instance, right now I'm writing a program using acts_as_solr for searching.  However, I also need to refine the results using named_scopes, and some of the searches would most naturally fit into a named_scope.  Therefore, I would love to be able to take the results of each query and combine them together on the fly in a paginated way.  If this sounds impossible, I've already dreamed up a basic architecture.  Here's a hint - just make sure that all queries have the same sorting.