无法将自定义Sitecore Lucene索引限制为/Sitecore/content/Home

无法将自定义Sitecore Lucene索引限制为/Sitecore/content/Home,lucene,sitecore,lucene.net,config,sitecore6,Lucene,Sitecore,Lucene.net,Config,Sitecore6,我正在尝试在运行Sitecore 6.3.1的站点上创建一个新的Lucene索引。我使用了现有的系统索引作为指导,并且成功地在web上创建了一个新的索引,并掌握了对Sitecore内容树中所有项目的索引 然而,我遇到的困难是限制数据库爬虫索引内容树的哪一部分。目前,搜索索引包含内容树中任意位置的项目内容项目、媒体库项目、布局、模板等。。我想将索引仅限于/sitecore/content/Home中的项目 我已经在~/App_Config/Include/Search index/website.

我正在尝试在运行Sitecore 6.3.1的站点上创建一个新的Lucene索引。我使用了现有的系统索引作为指导,并且成功地在web上创建了一个新的索引,并掌握了对Sitecore内容树中所有项目的索引

然而,我遇到的困难是限制数据库爬虫索引内容树的哪一部分。目前,搜索索引包含内容树中任意位置的项目内容项目、媒体库项目、布局、模板等。。我想将索引仅限于/sitecore/content/Home中的项目

我已经在~/App_Config/Include/Search index/website.Config创建了一个文件,并在下面粘贴了相关部分:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <sitecore>

    <!-- This works as expected.... -->
    <databases>
      <database id="web">
        <indexes hint="list:AddIndex">
          <index path="indexes/index[@id='website']" />
        </indexes>
      </database>

      <!-- ... similar entry for master database goes here ... -->
    </databases>

    <!-- So does this.... -->
    <indexes>
      <index id="website" singleInstance="true" type="Sitecore.Data.Indexing.Index, Sitecore.Kernel">
        <param desc="name">$(id)</param>
        <fields hint="raw:AddField">
          <!-- ... field descriptions go here ... -->
        </fields>
      </index>
    </indexes>

    <!-- This works... mostly.  The "__website" directory does get created,
          but the Root directive is getting ignored.
    -->
    <search>
      <configuration type="Sitecore.Search.SearchConfiguration, Sitecore.Kernel" singleInstance="true">
        <indexes hint="list:AddIndex">
          <index id="website" singleInstance="true" type="Sitecore.Search.Index, Sitecore.Kernel">
            <param desc="name">$(id)</param>
            <param desc="folder">__$(id)</param>

            <Analyzer ref="search/analyzer" />

            <locations hint="list:AddCrawler">
              <web type="Sitecore.Search.Crawlers.DatabaseCrawler, Sitecore.Kernel">
                <Database>web</Database>
                <Root>/sitecore/content/home</Root>
                <Tags>content</Tags>
              </web>

              <!-- ... similar entry for master database goes here ... -->
            </locations>
          </index>
        </indexes>
      </configuration>
    </search>
  </sitecore>
</configuration>
几点注意:

这不是来自我的web.config文件;我创建了一个单独的文件,以便可以通过Sitecore包分发配置更改

将索引添加到master和web中;为了简洁起见,我省略了对大师的引用

Sitecore正在处理配置/Sitecore/search/configuration的条目。我去看电影的时候可以看到他们http://localhost/sitecore/admin/showconfig.aspx,如果我将其中一个标记值更改为无效值,例如/nothere,Sitecore将在下一个页面加载时抛出异常

我已经查看了中的索引内容,但确实索引了错误的项目。例如,索引中的文档0是/sitecore节点


我哪里做错了?我需要对配置文件进行哪些更改才能使搜索索引器忽略/sitecore/content/Home之外的项目?

我可以使用。使用Alex演示文稿中提供的代码关闭配置/搜索/配置块(请参见上面的链接),使一切都开始工作,或多或少都是自动进行的。

我能够使用。使用Alex演示文稿中提供的代码关闭配置/搜索/配置块(请参见上面的链接),使一切开始工作,或多或少是自动进行的。

这最初发布在上。这最初发布在上。