SolrJ is a Java client to access solr. SolrJ offers a java interface to add, update, and query the solr index.
I use Spring to load this properties file:
and to populate this method:
By populating the method above with the values from the properties file, the system is able to work with a configured instance of the HttpSolrServer.
This code will find the total records that mention the word "climate":
A reusable method for executing a query: