I want to select the list of folders (without subfolders, not recursive) of a Document library using CrossListQueryCache.
Everything is working fine except that i am receiving ALL the folders and subfolders in the list and not just the first level of folders. what do i need to change in the code below so that only the first level of folders is returned without their subfolders and sub-subfolders etc...
string query = string.Empty;
string websQuery = string.Format("<Webs Scope=\"{0}\"/>", "None");
string lists = "<Lists ServerTemplate=\"101\"" + " ><List ID=\"" + listid + "\" /></Lists>";
bool useList = true;
string relativeUrl = this.GetRelativeUrl();
query = string.Format("<Where><Eq><FieldRef Name='FSObjType' /><Value Type='LookUp'>1</Value></Eq></Where>", relativeUrl);
CrossListQueryInfo info = new CrossListQueryInfo();
info.Lists = lists;
info.Webs = websQuery;
info.Query = query;
info.ViewFields = "<FieldRef Name=\"FileLeafRef\"/>";
info.WebUrl = web.ServerRelativeUrl;
CrossListQueryCache cache = new CrossListQueryCache(info);
SiteDataResults sd = cache.GetSiteDataResults(site, true);