本文介绍了如何开始从代码中SharePoint中的搜索范围的增量爬网?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以这样做?我没有发现任何东西在那里,显示了一种方法来做到这一点。

Can this be done? I haven't found anything out there that shows a way to do this.

推荐答案

一个搜索范围不能被抓取。 。搜索范围可以包括或不包括这实际上是抓取的内容源

A search scope can not be crawled. A search scope may include or exclude a content source which is actually crawled.

要开始抓取的内容源使用下面的代码:

To start a crawl on a content source use the following code:

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 

这篇关于如何开始从代码中SharePoint中的搜索范围的增量爬网?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 21:10