This project is read-only.

SharePoint Search Bench API Guide

Refer to the CHM help file in the current lease for detailed API documentation.

// example object model keyword query
Search search = new Search();
search.SearchType = SearchType.Keyword;
search.SearchText = new SearchTexst("dog cat llama");
Uri siteUri = new Uri("http://SharePointSite");
search.ContextUri = siteUri;
search.ApiSource = ApiSource.ObjectModel;
DataSet results = search.Execute();


// example service full text query
Search search = new Search();
search.SearchType = SearchType.FullText;
NetworkCredential credentials = CredentialCache.DefaultCredentials;
Uri serviceUri = new Uri("http://SharePointSite/_vti_bin/Search.asmx");
search.SearchText = new SearchText("SELECT Title, Author FROM Scope() " +
    "WHERE FREETEXT(DEFAULTPROPERTIES, 'dog cat llama') " +
    "ORDER BY RANK");
search.Credentials = credentials;
search.ApiSource = ApiSource.Service;
search.ContextUri = serviceUri;
DataSet results = search.Execute();

Last edited Feb 18, 2008 at 7:27 PM by kindohm, version 9

Comments

No comments yet.