public override void Run()
{
try
{
int docCount = 0;
while (Environment.TickCount < StopTime)
{
Document doc = new Document();
doc.Add(NewStringField("dc", "" + docCount, Field.Store.YES));
doc.Add(NewTextField("field", "here is some text", Field.Store.YES));
w.AddDocument(doc);
if (docCount % 13 == 0)
{
w.Commit();
}
docCount++;
}
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
}
}