我在安装Sitecore SOLR for 8.1后遇到以下错误。将所有lucene配置更改为禁用,并将solr配置为启用后,再将其添加到Global.asax中
public void Application_Start()
{
this.Container = new WindsorContainer();
var startup = new WindsorSolrStartUp(this.Container);
startup.Initialize();
}
我在上面添加这些行的那一刻,我收到了这个错误:
无法在类型为System.String的对象上找到属性“fieldMap” [InvalidOperationException:找不到属性'fieldMap' 对象类型:System.String]
Sitecore.Configuration.Factory.AssignProperties(Object obj,Object [] 属性)+2402
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String []参数,Object obj,布尔断言,布尔延迟, IFactoryHelper helper)+643
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String []参数,布尔断言,IFactoryHelper助手)+275
Sitecore.Configuration.Factory.CreateObject(String configPath, String []参数,布尔断言)+579
Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String []参数,布尔断言)+137
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String []参数,布尔断言,IFactoryHelper助手)+109
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String []参数,布尔断言)+120
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String []参数,Object obj,布尔断言,布尔延迟, IFactoryHelper helper)+552
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String []参数,布尔断言,IFactoryHelper助手)+275
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String []参数,布尔断言)+1013
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String []参数,Object obj,布尔断言,布尔延迟, IFactoryHelper helper)+552
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String []参数,布尔断言,IFactoryHelper助手)+275
Sitecore.Configuration.Factory.CreateObject(String configPath, String []参数,布尔断言)+579
Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +266 Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_Cores() +92 Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorSolrStartUp.Initialize() 44
有没有人知道为什么会这样?我尝试用新的8.1替换配置文件,但仍然没有运气。
谢谢!
答案 0 :(得分:0)
您不需要在Global.asax中添加任何代码,只需确保您的Global.asax仅在标题中包含以下标记:
<%@Application Language='C#' Inherits="Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorApplication" %>
答案 1 :(得分:0)
我发现有一个文件夹,我为Lucene遗漏了一个.disabled。这样做之后,它起作用了。哎呀!