improve add_docs function in solr.rb