Refactoring to allow repositories other than Solr