Passing SolrClient object in functions