Upgrading RubyGems search to Solr

In which I thoroughly break down some recent work on upgrading RubyGems.org from slow SQL-based search to a fast and flexible Solr-based approach.