I thought I could just do something like this:
SPQuery oQuery = new SPQuery();
oQuery.ViewAttributes = "Scope='MyScope'";
开发者_JAVA技巧 SPListItemCollection collListItems = oList.GetItems(oQuery);
but it is pulling back a bunch of stuff that is not in the scope. Is there a different way I should be doing this?
You are confusing SPQuery, which a list querying class, based on CAML, and the search API. Take a look into FullTextSqlQuery, which is the class you really should work with.
精彩评论