ActiveRecord to Repository, Changing Persistence Patterns with the Elasticsearch Rails Gem | Elastic Blog