内容搜索,重建索引错误

Ali*_*Ali 5 c# lucene solr sitecore sitecore7

我是Sitecore的新手,并且有一项任务是使用SiteCore 7 API构建搜索.在搜索结果查询执行时收到以下错误.

System.ArgumentNullException: Value cannot be null. Parameter name:
fieldNameTranslator
Run Code Online (Sandbox Code Playgroud)

从以下行引发的错误

IQueryable<SearchResultItem> results = context.GetQueryable<SearchResultItem>();
Run Code Online (Sandbox Code Playgroud)

堆栈说

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

我已登录到内容管理系统,在索引管理器中我正在尝试重建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,
Run Code Online (Sandbox Code Playgroud)

小智 5

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