I'm trying to use the SPSiteDataQuery to return the contents of several lists across a site collection. The problem I'm having, though, is that while there are only a few documents at the root level of these lists, the lists have folders containing large amounts of items, which causes the Query to exceed the List View Threshold.
I know that SPQuerys allow you to do something like
query.ViewAttributes = "Scope=\"Recursive\""
to recurse, and removing that will just show the results of the root folder only. Is there a way of filtering out ListItems that are in subfolders with any sort of CAML query?
SPSiteDataQuery. Your best bet is to try to refine your query more to return less items. – rjcup3 Jan 22 at 21:25List<SPListItem>and add the result sets. – rjcup3 Jan 22 at 21:35