Moved the solr doc modification to a separate helper function that can optionally be called from the Solr display function.