clearCaches();// prevent further OOM if this was caused by OOM
//Log.logException(e);
@ -92,7 +92,8 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
if(getSegmentCount()<=maxSegments)return;
synchronized(this.server){
try{
this.server.optimize(true,true,maxSegments);
//this.server.optimize(true, true, maxSegments);
newUpdateRequest().setAction(UpdateRequest.ACTION.OPTIMIZE,true,true,maxSegments,true).process(this.server);// this includes a 'true' for expungeDelete
}catch(finalThrowablee){
clearCaches();// prevent further OOM if this was caused by OOM