2016-07-05 112 views
3

我需要添加到单一的Solr指数2个不同的Sitecore的路径/Sitecore的/内容/系统/我的路径/Sitecore的/内容/系统/我的路径2Sitecore的Solr的索引配置设置不同的根路径

我如何以正确的方式做到这一点?

我应该只是将新的爬行器描述添加到具有新根值的位置部分。我应该使用|在根节的分割器?或者需要我复制所有索引节中根路径中的新路径?

<index id="my_index" type="Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex, Sitecore.ContentSearch.SolrProvider"> 
    <param desc="name">$(id)</param> 
    <param desc="core">myindex</param> 
    <param desc="rebuildcore">myindex_swap</param> 
    <param desc="propertyStore" ref="contentSearch/databasePropertyStore" param1="$(id)" /> 
    <configuration ref="contentSearch/indexConfigurations/countryIndexConfiguration" /> 
    <strategies hint="list:AddStrategy"> 
     <strategy ref="contentSearch/indexUpdateStrategies/manual" /> 
    </strategies> 
    <locations hint="list:AddCrawler"> 
     <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> 
      <Database>web</Database> 
      <Root>/sitecore/content/System/My Path</Root> 
     </crawler>       
    </locations> 
</index> 

回答

3

只需复制crawler并使用与原始名称不同的标签名称,例如, crawler1。无论标签名称是什么,所以您可以使用一些更具体的标签名称,例如newsblogs。重要的是,您不能在locations标签下使用同名的2个标签。

样本配置有2根:

<locations hint="list:AddCrawler"> 
    <news type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> 
     <Database>web</Database> 
     <Root>/sitecore/content/System/news</Root> 
    </news>       
    <blogs type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> 
     <Database>web</Database> 
     <Root>/sitecore/content/System/blogs</Root> 
    </blogs>       
</locations> 
0

我们使用多个代码与名称相同位置下的履带和其工作的罚款。它支持具有相同名称的多个标签。