Examples of forceMergeDeletes()


Examples of org.apache.lucene.index.IndexWriter.forceMergeDeletes()

      executor.execute( filler );
    }
    executor.shutdown();
    executor.awaitTermination( 600, TimeUnit.SECONDS );
    iw.commit();
    iw.forceMergeDeletes();
    iw.forceMerge( 1 );
    iw.close();
    System.out.println( "Index created." );
  }
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.forceMergeDeletes()

    synchronized (_optimizeMonitor) {
      BaseSearchIndex<R> idx = getSearchIndex();
      IndexWriter writer = null;
      try {
        writer = idx.openIndexWriter(_analyzer, _similarity);
        writer.forceMergeDeletes();
      } finally {
        if (writer != null) {
          idx.closeIndexWriter();
        }
      }
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.forceMergeDeletes()

                if (optimize.upgrade()) {
                    ((ElasticsearchMergePolicy)mp).setUpgradeInProgress(true);
                }
               
                if (optimize.onlyExpungeDeletes()) {
                    writer.forceMergeDeletes(false);
                } else if (optimize.maxNumSegments() <= 0) {
                    writer.maybeMerge();
                    possibleMergeNeeded = false;
                } else {
                    writer.forceMerge(optimize.maxNumSegments(), false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.