CM环境中的Sitecore Web索引

Aym*_*oum 1 solr sitecore sitecore8 sitecore8.1

我正在CM和CD环境中部署我的网站,我使用solr进行搜索我按照Sitecore的所有说明从这个链接配置cm环境:

https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/xdb/configuring_servers/configure_a_content_management_server#_How_to_configure

当我打开cm网站时,我收到错误说sitecore_web_index未找到:

在此输入图像描述

在上面的链接当我转到文件以启用或禁用Solr部分并单击"Excel电子表格".他们说禁用

Sitecore.ContentSearch.Solr.Index.Web.config:

在此输入图像描述

有关此错误的任何想法?我应该在CM上保持web索引禁用吗?

我正在使用sitecore 8.1 update 2

我正在使用此代码来检索项目:

ISearchIndex SitecoreSearchIndex=ContentSearchManager.GetIndex("sitecore_" + Sitecore.Context.Database.Name + "_index");
using (var context = SitecoreSearchIndex.CreateSearchContext())
{
    var culture = Sitecore.Context.Language.CultureInfo;
    var predicate = PredicateBuilder.True<SearchResultItem>();
    predicate = predicate.And(p => p.Paths.Contains(CommonTextFolderId));
    predicate = predicate.And(p => p.TemplateId == CommonTextTemplateId);
    predicate = predicate.And(p => p.Language == culture.Name);
    var items = context.GetQueryable<SearchResultItem>().Where(predicate);
    listCommonTexts = items.Select(p => SitecoreContext.Cast<CommonTextModel>(p.GetItem(), false, false)).ToList();

}
Run Code Online (Sandbox Code Playgroud)

Mar*_*lak 5

使用时Solr,不应sitecore_web_index在Content Management服务器上禁用.事实上,它的CM服务器应该重建所有索引.

在Content Delivery服务器上,所有索引策略都应设置为手动 - 所有CD服务器都不应重建索引.

检查此问题以解释在CD和CM服务器上Solr索引应采用什么策略:SOLR搜索提供程序的Sitecore 8.1索引重建策略