I am trying to search in Pages and Document libraries once. Is there a template in CAML that works for both document libraries and pages libraries.
I have this for pages library only but it doesn't search document libraries
siteDataQuery.Lists ="<listsLists ServerTemplate=\"850\" />";
Full Code
sing (SPWeb web = new SPSite(SPContext.Current.Site.RootWeb.Url).OpenWeb())
{
siteDataQuery.ViewFields = "<FieldRef Nullable=\"TRUE\" Name=\"FileRef\"/><FieldRef Name=\"Title\"/>";
siteDataQuery.Lists = "<Lists ServerTemplate=\"101\" />";
siteDataQuery.RowLimit = 500;
siteDataQuery.Webs = "<Webs Scope=\"Recursive\"/>";
siteDataQuery.Query = "<Where><And><Eq><FieldRef Name='ContentType' /><Value Type='Computed'Page-Archive Item</Value></Eq><Eq><FieldRef Name='Metadata' LookupId='True' /><Value Type='Integer'>447</Value></Eq></And></Where>"
System.Data.DataTable dataTable = web.GetSiteData(siteDataQuery);
}
I need to search every subsites and their respective document and page libraries.
Any ideas??