Monday, October 25, 2010

Search scopes for your search service application in SharePoint 2010

SearchServiceApplicationProxy;

// Service Application Info object to retrieve the application id for the search service.
SearchServiceApplicationInfo searchApplictionInfo =
searchApplicationProxy.GetSearchServiceApplicationInfo();

// Retrieve the search application instance for the specified id.
SearchServiceApplication searchApplication =
Microsoft.Office.Server.Search.Administration.SearchService.Service.SearchApplications.GetV
alue (searchApplictionInfo.SearchServiceApplicationId);

//get the current scopes defined in the search server
Scopes scopes = new Scopes(searchApplication);

No comments:

Post a Comment