c# - 内容搜索、重建索引错误

标签 c# solr lucene sitecore sitecore7

我是 Sitecore 的新手,接到一项使用 SiteCore 7 API 构建搜索的任务。在执行搜索结果查询时出现以下错误。

System.ArgumentNullException: Value cannot be null. Parameter name:
fieldNameTranslator

下一行引发的错误

IQueryable<SearchResultItem> results = context.GetQueryable<SearchResultItem>();

堆栈说

Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter valueFormatter, IFieldQueryTranslatorMap`1 fieldQueryTranslators, FieldNameTranslator fieldNameTranslator, IExecutionContext[] executionContexts) +284

我已经登录到内容管理系统并在索引管理器中尝试重建 sitecore_web_index 的索引,但出现以下错误

Job started: Index_Update_IndexName=sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sitecore.Exceptions.ProviderConfigurationException: Solr operations unavailable. Please check your global.asax,

最佳答案

  • 检查您是否可以从托管 Sitecore 应用程序的计算机访问 Solr。
  • 确保 ContentSearch.Solr.ServiceBaseAddress 设置指向正确的 Solr 资源
  • 如果您的解决方案使用 IoC,请确保只为您的应用程序定义了一个 IoC 容器实例。如果需要,将容器初始化移动到 Application_Start 方法。

关于c# - 内容搜索、重建索引错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23533308/

相关文章:

c# - 根据指定种类更改更改日期时间

c# - 如何从具有不同类型参数的函数返回 float ?

Solr-以所有顺序包含所有术语的结果

database - 是否可以实时自动从 elasticsearch 中删除早于例如 10 天的数据?

java - 如何在 Lucene ( JAVA ) 的 BM25 实现中计算 avgLengthPath

java - Lucene 6.0.0 从索引中删除文档

c# - 获取过去一年的 Facebook 数据?

c# - 执行多个线程

solr - Solr中/select和/query处理程序之间的区别

jquery - 将内容从一页拉到另一页(同一域)