public override int DoLogic() { IndexReader reader = RunData.GetIndexReader(); RunData.SetIndexReader(null); if (reader.RefCount != 1) { Console.WriteLine("WARNING: CloseReader: reference count is currently " + reader.RefCount); } reader.DecRef(); return(1); }
public override int DoLogic() { DirectoryReader r = RunData.GetIndexReader(); DirectoryReader nr = DirectoryReader.OpenIfChanged(r); if (nr != null) { RunData.SetIndexReader(nr); nr.DecRef(); } r.DecRef(); return(1); }