Refactoring Solr in mmdemo