Object based ActiveRecord searching, paginating, ordering, and more
Version: 2.3.5Searchlogic‘s inspiration comes right from ActiveRecord. ActiveRecord lets you create objects that represent a record in the database, so why can‘t you create objects that represent searching the database? Now you can! It‘s searching, ordering, and pagination all in one.
Operating System: Mac OS X
ActiveRecord should never know about Searchlogic
What that rule means is that any options you pass when searching get "sanitized" down into options ActiveRecord can understand. Searchlogic serves as a transparent filter between you and ActiveRecord. It doesn‘t dig into the ActiveRecord internals, it only uses what is publicly available. It jumps in and helps out only when needed, otherwise it sits back and stays completely out of the way.
Lastly, Searchlogic is lazy. It will only create methods, objects, and classes when needed. Once Searchlogic creates them it caches them. For example, all of the nifty conditions are created via meta programming.
The first time you execute something like User.new_search all of that method creation gets cached into Searchlogic::Cache::UserSearch. The next time you execute User.new_search it will be over 50 times faster because it uses the cached class.
Between that and the extensive tests, this is a solid and fast plugin.
NOTE: Searchlogic is licensed and provided under the terms of the MIT License.