write.lock
public virtual void DoTestUndeleteAll() { sis.Read(dir); IndexReader reader = OpenReader(); Assert.IsTrue(reader != null); Assert.AreEqual(2, reader.NumDocs()); reader.DeleteDocument(0); Assert.AreEqual(1, reader.NumDocs()); reader.UndeleteAll(); Assert.AreEqual(2, reader.NumDocs()); // Ensure undeleteAll survives commit/close/reopen: reader.Commit(); reader.Close(); if (reader is MultiReader) { // MultiReader does not "own" the directory so it does // not write the changes to sis on commit: sis.Commit(dir); } sis.Read(dir); reader = OpenReader(); Assert.AreEqual(2, reader.NumDocs()); reader.DeleteDocument(0); Assert.AreEqual(1, reader.NumDocs()); reader.Commit(); reader.Close(); if (reader is MultiReader) { // MultiReader does not "own" the directory so it does // not write the changes to sis on commit: sis.Commit(dir); } sis.Read(dir); reader = OpenReader(); Assert.AreEqual(1, reader.NumDocs()); }
protected internal override void DoUndeleteAll() { in_Renamed.UndeleteAll(); }
protected internal override void DoUndeleteAll(IState state) { in_Renamed.UndeleteAll(state); }