| |||||
| |||||
Search Irongeek.com:
Help Irongeek.com pay for bandwidth and research equipment: |
Easily searching across an application's data is a pervasive need. If you are lucky, you can get away with simple sorting or searching on a single column, but it is more likely that you need full text search across multiple models, all from a single search ``.
Thanks to the power of [Postgres' full text search], [rolling your own search] isn't too difficult.
Following an actual feature evolution which I worked on for a client, we will start with a search feature that queries a single column with `LIKE` and build up to finding results across multiple columns on multiple tables using database views, optimizing the query time with full text indices and representing the results as a polymorphic association on an ActiveRecord model in Rails.
InfoSec Wonk. Geek. Pirate Captain. Triathlete. GRT.
Recorded at NolaCon 2016
15 most recent posts on Irongeek.com:
|
If you would like to republish one of the articles from this site on your
webpage or print journal please contact IronGeek.
Copyright 2020, IronGeek
Louisville / Kentuckiana Information Security Enthusiast