refactor to lower memory consumption: merge mongo retrieve and solr indexing