1
可以这样做吗?我还没有发现任何可以做到这一点的方法。如何从SharePoint中的代码开始对搜索范围的增量爬网?
可以这样做吗?我还没有发现任何可以做到这一点的方法。如何从SharePoint中的代码开始对搜索范围的增量爬网?
搜索范围无法被抓取。搜索范围可以包括或排除实际被爬行的内容源。
要启动内容源抓取使用以下代码:
SearchServiceApplicationProxy proxy = SearchServiceApplicationProxy.GetProxy(SPServiceContext.Current);
Guid appId = ssap.GetSearchServiceApplicationInfo().SearchServiceApplicationId;
SearchServiceApplication app = SearchService.Service.SearchApplications.GetValue<SearchServiceApplication>(appId);
Content content = new Content(app)
ContentSource cs = content.ContentSources["<content source name>"];
cs.StartIncrementalCrawl();
// check on cs.CrawlStatus if finished