Package org.apache.lucene.index

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


    // Make a new policy and initialize with snapshots.
    sdp = getDeletionPolicy(sdp.getSnapshots());
    writer = new IndexWriter(dir, getConfig(random, sdp));
    // attempt to delete unused files - the snapshotted files should not be deleted
    writer.deleteUnusedFiles();
    writer.close();
    assertSnapshotExists(dir, sdp, numSnapshots);
    dir.close();
  }
View Full Code Here


    writer.addDocument(new Document());
    writer.commit();
   
    // release "s1" should not delete "s2"
    sdp.release(s1);
    writer.deleteUnusedFiles();
    checkSnapshotExists(dir, ic2);
   
    writer.close();
    dir.close();
  }
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.