public override void Run()
            {
                try
                {
                    var            seen  = new HashSet <string>();
                    IList <string> paths = new List <string>();
                    while (true)
                    {
                        Document doc      = new Document();
                        int      numPaths = TestUtil.NextInt(Random(), 1, 5);
                        for (int i = 0; i < numPaths; i++)
                        {
                            string path;
                            if (paths.Count > 0 && Random().Next(5) != 4)
                            {
                                // Use previous path
                                path = paths[Random().Next(paths.Count)];
                            }
                            else
                            {
                                // Create new path
                                path = null;
                                while (true)
                                {
                                    path = TestUtil.RandomRealisticUnicodeString(Random());
                                    if (path.Length != 0 && !seen.Contains(path))
                                    {
                                        seen.Add(path);
                                        paths.Add(path);
                                        break;
                                    }
                                }
                            }
                            doc.Add(new FacetField("field", path));
                        }
                        try
                        {
                            w.AddDocument(config.Build(tw, doc));
                            if (mgr != null && Random().NextDouble() < 0.02)
                            {
                                w.Commit();
                                tw.Commit();
                                mgr.MaybeRefresh();
                            }
                        }
                        catch (IOException ioe)
                        {
                            throw new Exception(ioe.Message, ioe);
                        }

                        if (VERBOSE)
                        {
                            Console.WriteLine("TW size=" + tw.Size + " vs " + ordLimit);
                        }

                        if (tw.Size >= ordLimit)
                        {
                            break;
                        }
                    }
                }
                finally
                {
                    stop.Set(true);
                }
            }