Querying your database across associations can become a bottleneck in your Rails application. Julian Rubisch, our first guest author, explains why and suggests an efficient solution.
Full-text search is a vital part of many web applications. Approaches to tackle this challenge are as diverse as the circumstances under which your app operates:
Chances are, though, either of these solutions are breaking a fly on a wheel for your application. If you are using Postgresql as your database management system, the pg_search gem might be a perfect, low friction fit that doesn’t introduce additional operational complexity.
Let’s quickly recap the functionality of this gem. If you are already familiar with it, you might want to skip this section and continue reading below.
Generally, after installing the gem into your application bundle, you include the PgSearch::Model module in any model that you want to equip with full-text search capabilities.