public AndQueryEnumerator(List <IQueryExecutor> executors) { foreach (var executor in executors) { Enumerators.Add(executor.GetEnumerator()); } Enumerators.Sort(delegate(IDocIdSetEnumerator p1, IDocIdSetEnumerator p2) { return(p1.Cost.CompareTo(p2.Cost)); }); Lead = Enumerators[0]; }