public static void main(String[] args) throws Exception{ HttpSolrClient server = new HttpSolrClient("http://"); SolrInputDocument solrDoc = new SolrInputDocument(); HashMap map = new HashMap(); map.put("set","test2"); solrDoc.addField("rowkey","row2"); solrDoc.addField("BROWSER",map); server.add(solrDoc); server.commit(); System.out.println("ok!"); } }