solr - 为什么在为 Sitecore 7 重新索引我的 Solr 搜索索引时会收到 "unable to write data to the transport connection"错误?

标签 solr sitecore sitecore7.5

当我尝试使用 Solr 重新索引我的 Sitecore 7 站点时。我在 Solr 日志中收到以下错误。

10232 09:10:03 WARN Crawler:AddRecursive DoItemAdd 失败 - {550B5CEF-242C-463F-8ED5-983922A39863}
异常:System.IO.IOException
消息:无法将数据写入传输连接:远程主机强行关闭了现有连接。
来源:系统
在 System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
在 System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 SolrNet.Impl.SolrConnection.CopyTo(流输入,流输出)
在 SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 参数)
在 SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)
在 SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)
在 Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddRange(IEnumerable`1 group, Int32 groupSize)
在 Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddDocument(Object itemToAdd, IExecutionContext[] executionContexts)
在 Sitecore.ContentSearch.SitecoreItemCrawler.DoAdd(IProviderUpdateContext context, SitecoreIndexableItem indexable)
在 Sitecore.ContentSearch.HierarchicalDataCrawler`1.CrawlItem(Tuple`3 tuple)

嵌套异常

异常:System.Net.Sockets.SocketException
消息:现有连接被远程主机强行关闭
来源:系统
在 System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)

任何想法为什么会发生这种情况?

最佳答案

尝试查看您的 solr 日志以查找来自 的任何错误。 SolrCore 通过浏览 - http://yoursolrinstance/solr/#/~logging

我发现 Solr 存在从 dynamicField 类型生成的字段的问题。

在我的实例中,Solr 正在寻找 'myfieldname_t_cs' 并为 cs-CZ 语言中的项目抛出和“未知字段”异常。

solr schema.xml 中的动态字段定义有一个字段定义 <dynamicField name="*_t_cz" type="text_cz" indexed="true" stored="true" />但没有映射 _cs 后缀,所以我添加了 <dynamicField name="*_t_cs" type="text_cz" indexed="true" stored="true" />重新启动 Tomcat 并重建我的索引并清除了该错误。

我也有关于波兰语内容的 Solr 错误,因为根本没有定义语言区域信息,而挪威在 schema.xml 中将该字段定义为 <dynamicField name="*_t_no" type="text_no" indexed="true" stored="true" />但是 solr 正在搜索后缀 '*_nb' 例如,未知字段“id_t_nb”并引发未知字段异常。

Sitecore 和 Solr 映射语言以使用 Region Info 的方式似乎存在问题,我将向 Sitecore 支持提出请求,并在收到回复时更新答案。

您在错误中提到中文可能是因为 Solr 中没有定义中文,但您在 Sitecore 中有该语言的一些内容。

更新

Sitecore 已将此行为确认为错误

I have found that when generating search schema and updating indexes different attributes are used (the name of language and culture). I will register this behavior as a bug and register a wish to implement a full support of the languages that are supported in SOLR by default.

关于solr - 为什么在为 Sitecore 7 重新索引我的 Solr 搜索索引时会收到 "unable to write data to the transport connection"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28586105/

相关文章:

postgresql - 露天 : Cannot find Alfresco Repository

ruby-on-rails - Elastic Beanstalk 部署后自动重启 SolR

php - Solr 如何删除数组中除记录之外的所有记录?

solr - 多选 Solr 过滤和分面

Sitecore 升级到 v.8.1-U2 : Experience Editor - A serious error occurred please contact the administrator

c# - sitecore 搜索的基本用法

mongodb - Sitecore 7.5 DMS 以编程方式跟踪目标

sitecore - 用户角色未更新

sitecore - 以编程方式渲染 sitecore mvc 渲染

javascript - 从 JavaScript (MVC) 调用 Sitecore Controller 方法