Changed db queries to solr