code: public SolrInputDocument buildSolrDocument(HashMap<String, Object> hshMap)
  			throws Exception {
  
  		SolrInputDocument doc = new SolrInputDocument();
  
  		Iterator<String> keys = hshMap.keySet().iterator();
  		while (keys.hasNext()) {
  			String key = keys.next();
  			Object value = hshMap.get(key);
  
  			SolrInputField field = new SolrInputField(key);
  			try {
  
  				doc.addField(field.getName(), value, 1.0f);
  
  			} catch (Exception e) {
  				e.printStackTrace();
  			}
  		}
  
  		return doc;
  
  	}
docs: Building solr document for indexing from key-value pairs*