private Collector CreateTimedCollector(MyHitCollector hc, long timeAllowed, bool greedy) { TimeLimitingCollector res = new TimeLimitingCollector(hc, timeAllowed); res.IsGreedy = greedy; // set to true to make sure at least one doc is collected. return res; }