public override void Run() { try { while (!doStop) { w.UpdateDocument(new Term("docid", "" + Random.Next(numStartDocs)), docs.NextDoc()); // Force deletes to apply w.GetReader().Dispose(); } } catch (Exception t) { throw new Exception(t.Message, t); } }
public override void Run() { try { while (!doStop) { w.UpdateDocument(new Term("docid", "" + Random.Next(numStartDocs)), docs.NextDoc()); // Force deletes to apply w.GetReader().Dispose(); } } catch (Exception t) when(t.IsThrowable()) { throw RuntimeException.Create(t); } }