> You can still access the raw params for the update request > though - and then just look at > http://wiki.apache.org/solr/UpdateXmlMessages#A.22commit.22_and_.22optimize.22 > > Just get the modifiable params from the request and set the > soft commit.
Does this code work? SolrServer server = new HttpSolrServer(url); UpdateRequest req = new UpdateRequest(); req.setParam(UpdateParams.SOFT_COMMIT, "true"); UpdateResponse updateResponse = req.process(server); System.out.println(updateResponse);