Yes, This worked for me:
//Solr Server initialization System.setProperty("solr.solr.home", solrHome); CoreContainer.Initializer initializer = new CoreContainer.Initializer(); coreContainer = initializer.initialize(); server = new EmbeddedSolrServer(coreContainer, "your_corename"); //Create your SolrInputDocument doc ... //Soft commit UpdateRequest req = new UpdateRequest(); req.setAction(ACTION.COMMIT, false, false, true); req.add( doc ); UpdateResponse rsp = req.process( server ); Regards, Raimon Bosch. 2012/6/26 Mark Miller <markrmil...@gmail.com> > Yes - just pass the param same as you would if not using embedded > > On Jun 25, 2012, at 4:40 PM, Raimon Bosch wrote: > > > Old question but I'm still wondering if this is possible. I'm using Solr > > 4.0. > > > > Can I use the EmbeddedSolrServer to perform soft commits? > > > > 2011/9/16 Raimon Bosch <raimon.bo...@gmail.com> > > > >> Hi all, > >> > >> I'm checking how to do soft commits with the new version of Solr. I'm > >> using EmbeddedSolrServer to add documents to my index. How can I > perform a > >> soft commit using this class? Is it possible? Or should I use the trunk? > >> > >> http://wiki.apache.org/solr/NearRealtimeSearch > >> > >> > http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.html > >> > >> Thanks in advance, > >> Raimon Bosch. > >> > > - Mark Miller > lucidimagination.com > > > > > > > > > > > >