Examples of expungeDeletes()


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

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

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

    id.setValue("1");
    w.addDocument(doc);
    w.deleteDocuments(new Term("id", "0"));

    IndexReader r = w.getReader();
    w.expungeDeletes();
    w.close();
    r.close();
    r = IndexReader.open(dir, true);
    assertEquals(1, r.numDocs());
    assertFalse(r.hasDeletions());
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.