在自定义Webpart中读取搜索内容源值时出错 [英] Error when reading a search content source values in custom webpart

查看:96
本文介绍了在自定义Webpart中读取搜索内容源值时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个自定义Webpart来获取搜索内容源的值并将其显示在Webpart上.它运行良好,并且能够列出指定内容源中存在的所有值.但是,当我转到中央管理员并在其中添加/删除任何值时 内容源,然后当我返回我的Webpart时,而是列出更新后的值,它给出了以下错误消息.

I wrote a custom webpart to fetch values of a search content source and show it on the webpart. It works well and able to list all the values that are there in specified content source. However, when i go to central admin and add/remove any value in that content source and then when i come back to my webpart, instead listing updated values,  it is giving below error message.

搜索配置自上次检索以来已得到更新.在Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer [T](CodeToRun`1 remoteCode,CodeToRun`1 localCode,布尔值useCurrentSecurityContext,Microsoft.Office.Server.Search.Administration.SearchApi.GetContentSources(Int32 versionIn)在Microsoft.Office.Server.Search.Administration.ContentSourceCollection..ctor(Content 父)位于Microsoft.Office.Server.Search.Administration.Content.get_ContentSources(),位于CustomWebparts.TestWebpart.TestWebpart.LoadContentSourceAddresses(),位于CustomWebparts.TestWebpart.TestWebpart.Page_Load(Object sender,EventArgs e)

The search configuration has been updated since it was last retrieved. at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn) at Microsoft.Office.Server.Search.Administration.SearchApi.GetContentSources(Int32 versionIn) at Microsoft.Office.Server.Search.Administration.ContentSourceCollection..ctor(Content parent) at Microsoft.Office.Server.Search.Administration.Content.get_ContentSources() at CustomWebparts.TestWebpart.TestWebpart.LoadContentSourceAddresses() at CustomWebparts.TestWebpart.TestWebpart.Page_Load(Object sender, EventArgs e)

任何人都可以在这方面提供帮助..

any one can help in this regard..!

先谢谢您

感谢和问候Raj

推荐答案

您好,RajKumarBathula,

Hi RajKumarBathula,

更新内容源之后,尝试启动增量爬网或完全爬网,然后再次检查.

After you update the content source, try to start an incremental crawl or full crawl and check again.

如果存在问题,请尝试重置索引并通过搜索服务应用程序->爬行"部分下的索引重置"开始完全爬行.

If the issue exists, try to reset the index and start a full crawl through search service application->Index Reset under Crawling section.

此外,这是一个类似的帖子,用于编辑自定义代码以获取搜索内容供您参考:

Besides, here is a similar post to edit the custom code to get search content for your reference:

最诚挚的问候,

Grace Wang

Grace Wang


这篇关于在自定义Webpart中读取搜索内容源值时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆