opscode/supermarket — pull request #690 by tristanoneil (2014-07-30 15:31:24+00:00)
Title: Improve cookbook search ranking

:fork_and_knife: Only use trigram search for cookbook names add tie breaker when ranks are the same rank primarily by `:trigram` giving greater precedence to cookbook names.

This still isn't perfect but the results are far better than they currently are and it should resolve [these](https://trello.com/c/2ZKcy1OW/375-make-cookbook-search-better-match-user-expectations) unexpected results. I get the sense that in order to get the best results possible we either need to move away from abstracting search with `pg_search` so we can have more control over the queries being generated or move to something with more robust ranking like solr.