just try to use SolrJ (Apache Solr Client)