Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SPSite currentSite = SPContext.Current.Site;
- SearchQueryAndSiteSettingsServiceProxy settingsProxy = SPFarm.Local.ServiceProxies.GetValue<SearchQueryAndSiteSettingsServiceProxy>();
- SearchServiceApplicationProxy searchProxy = settingsProxy.ApplicationProxies.GetValue<SearchServiceApplicationProxy>("SEARCH SERVICE NAME");
- SearchObjectOwner serviceApplicationOwner = new SearchObjectOwner(SearchObjectLevel.Ssa);
- SourceRecord serviceApplicationResultSourceMedia = searchProxy.GetResultSourceByName("SEARCH RESULT SOURCE NAME", serviceApplicationOwner);
- KeywordQuery query = new KeywordQuery("CURRENT SITE OBJECT");
Add Comment
Please, Sign In to add comment