Made the code more generic where SOLR is only one implementation type and more implementation types can be easily added