public static void PerformSearch(string resname, Index idx, string idxname, IndexArgumentSetup setup)
{
if (setup.ExecuteSearch) {
var ops = new ShellSearchOptions (setup.QUERIES, idxname, resname);
var qstream = new QueryStream (setup.QUERIES, setup.QARG);
Commands.Search (idx, qstream.Iterate (), ops);
GC.Collect ();
}
}