/** * This method optimizes the Solr index. */ public void optimize() throws SolrServerException, IOException { server.optimize(); }
/** waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access * @throws IOException */ public UpdateResponse optimize( ) throws SolrServerException, IOException { return optimize(true, true, 1); }
/** * This method optimizes the Solr index. */ public void optimize() throws SolrServerException, IOException { server.optimize(); }
public UpdateResponse optimize( boolean waitFlush, boolean waitSearcher ) throws SolrServerException, IOException { return optimize(waitFlush, waitSearcher, 1); }
public void optimize() throws SolrServerException, IOException { coreUpdateServer.optimize(); }
SolrServer server = CacheServer.getCacheInstance().getServer(); try { server.optimize(); } catch (SolrServerException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
public boolean optimize() { try { server.optimize(); return true; } catch (Exception e) { if (log.isDebugEnabled()) { log.error("Error while trying to optimize index. " + e, e); } else { log.error("Error while trying to optimize index. {}", e.toString()); } } return false; }
@Override public void optimizeSOLR() { try { long start = System.currentTimeMillis(); System.out.println("SOLR Optimize -- Process Started:" + start); solr.optimize(); long finish = System.currentTimeMillis(); System.out.println("SOLR Optimize -- Process Finished:" + finish); System.out.println("SOLR Optimize -- Total time taken:" + (finish - start) + " (ms)."); } catch (SolrServerException sse) { System.err.println(sse.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } }
@Override public void run() { try { isOptimizing = true; long init = System.nanoTime(); notifyOptimizeStatred(init); server.optimize(); notifyOptimizeFinished((System.nanoTime() - init)/1000000); isOptimizing = false; } catch (Exception e) { logger.error(e); notifyErrorOnOptimize(new OptimizeException(e)); } } };
/** * This will case the SolrIndex to be optimised * @throws YardException on any error while optimising */ public final void optimize() throws YardException { if(closed){ throw new IllegalStateException("The SolrYard is already closed!"); } try { server.optimize(); } catch (SolrServerException e) { throw new YardException("Unable to optimise SolrIndex!", e); } catch (IOException e) { throw new YardException("Unable to optimise SolrIndex!", e); } } /**
/** * This will case the SolrIndex to be optimised * @throws YardException on any error while optimising */ public final void optimize() throws YardException { if(closed){ throw new IllegalStateException("The SolrYard is already closed!"); } try { server.optimize(); } catch (SolrServerException e) { throw new YardException("Unable to optimise SolrIndex!", e); } catch (IOException e) { throw new YardException("Unable to optimise SolrIndex!", e); } } /**
@Override public void optimize() throws TrainingSetException { try { getActiveSolrServer().optimize(); } catch (Exception e) { throw new TrainingSetException("Error optimizing training dataset " + getName(), e); } }
public void optimize() throws IndexServiceException { try { solr.server().optimize(); } catch (SolrServerException e) { throw new IndexServiceException(e); } catch (IOException e) { throw new IndexServiceException(e); } }
@Override public void optimize() throws TrainingSetException { try { getActiveSolrServer().optimize(); } catch (Exception e) { throw new TrainingSetException("Error optimizing training dataset " + getName(), e); } }
/** * Execute optimisation of the Solr index */ public void optimize(final int maxSegments) throws SolrServerException, IOException { this.getServer().optimize(true, true, maxSegments); }
/** * Execute optimisation of the Solr index */ public void optimize(final int maxSegments) throws SolrServerException, IOException { this.getServer().optimize(true, true, maxSegments); }
private void commitSolr(boolean optimize, int retriesLeft) throws IOException, IntactSolrException { try { solrServer.commit(); if (optimize) { solrServer.optimize(); // Recommendations are that all searchers are closed and reopened when Solr index is optimized // as files on the file system can be deleted and create NFS Stale File Handles. // this.converter } } catch ( SolrServerException e ) { handleCommitException( e, optimize, retriesLeft ); } catch ( SolrException e ) { handleCommitException( e, optimize, retriesLeft ); } }
private void commitSolr(boolean optimize, int retriesLeft) throws IOException, IntactSolrException { try { if (optimize) { solrServer.optimize(); // Recommendations are that all searchers are closed and reopened when Solr index is optimized // as files on the file system can be deleted and create NFS Stale File Handles. // this.converter } else { solrServer.commit(); } } catch ( SolrServerException e ) { handleCommitException( e, optimize, retriesLeft ); } catch ( SolrException e ) { handleCommitException( e, optimize, retriesLeft ); } }
@Override @ManagedOperation(description="Optimize index") public void optimizeIndex(Boolean waitFlush, Boolean waitSearcher, Integer maxSegments) { try { indexManager.getIndex().getUpdateServer().optimize(waitFlush, waitSearcher, maxSegments); } catch (SolrServerException e) { throw new GeneralServiceException(e, "Error while optimizing solr index"); } catch (IOException e) { throw new GeneralServiceException(e, "Error while optimizing solr index"); } }
@Override @ManagedOperation(description="Optimize index with default parameters") public void optimizeIndex() { try { indexManager.getIndex().getUpdateServer().optimize(); } catch (SolrServerException e) { throw new GeneralServiceException(e, "Error while optimizing solr index"); } catch (IOException e) { throw new GeneralServiceException(e, "Error while optimizing solr index"); } }