lucene - 无法创建类型为 : Sitecore. ContentSearch.LuceneProvider.Analyzers.DefaultPerFieldAnalyzer 的实例。找不到匹配的构造函数

标签 lucene sitecore sitecore7.1

我们正在将项目从 sitecore 6.2 迁移到 sitecore 7.1。

我正在尝试在升级 Lucene Search 后安装 Active Directory 包“Sitecore Active Directory 1.1 rev. 130705”。
我收到错误

"Sitecore.Exceptions.ConfigurationException: Could not create instance of type: Sitecore.ContentSearch.LuceneProvider.Analyzers.DefaultPerFieldAnalyzer. No matching constructor was found.".

这是我尝试使用 sitecore 7.1 中的安装向导安装软件包时

最佳答案

Exception Message指出 Sitecore 的 ContentSearch 存在问题.它与 Lucene 的版本或升级问题无关。问题的根源是不正确的 Lucene 或 Solr(取决于您使用的是哪个)IndexConfiguration.config文件。

先检查这个

在继续之前,请确保它不是人为错误。如果您在 App_Config/Includes/ 中有索引文件,则会显示此错误。不止一次。或者如果两个或多个索引配置文件具有相同的 xml 元素名称。

选项 1 - 删除文件

您可以从 /App_Config/Includes/ 中删除有问题的 IndexConfiguration.config。文件夹并更新相关 Index配置文件以使用 DefaultIndexConfigurationconfiguration XML 节点;

<configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration" />

选项 2 - 修复文件

另一个选项是修改自定义 IndexConfiguration。大多数开发人员都熟悉创建自定义 Index通过复制配置文件的全部内容,因此将复制整个 DefaultIndexconfiguration配置以创建自定义 IndexConfiguration导致异常。这是不需要的。

您只需要 DefaultIndexconfiguration 中的少量设置。配置如本博客中所示如何create a custom IndexConfiguration .

关于lucene - 无法创建类型为 : Sitecore. ContentSearch.LuceneProvider.Analyzers.DefaultPerFieldAnalyzer 的实例。找不到匹配的构造函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20391738/

相关文章:

asp.net-mvc - Sitecore在我的MVC解决方案中仅给出了文字 "Default page"的空白页

azure - 如何在Azure搜索索引中获取字符匹配而不是子字符串

java - Solr 5.1 : Solr is creating way too many log files

java - 如何打开 Lucene 4.3 索引?

c# - Elasticsearch计数术语忽略大小写

c# - 使用 ToList<T> 转换 Sitecore Item[] 的问题

c# - Sitecore Azure 打包错误

sitecore - 为什么 Sitecore 标准值没有得到传播?

solr - 使用 Solr 和 Tika 索引 PDF 内容

c# - Sitecore 命令模板中的执行方法不会触发