Sitecore Lucene指数

时间:2013-11-26 03:50:20

标签: sitecore

我们最近部署到客户端环境,我们没有看到新闻项目 - 这些是使用基于模板ID的Lucene搜索找到的

我只能认为Lucene没有找到它们。我已经重建了搜索索引,我们肯定会搜索正确的模板。

我认为这个消息没有被Lucene列入已发现的项目中。我无法在Sitecore.SharedSource.Search.config中看到任何阻止返回结果的内容。搜索索引适用于其他项目(我们将其用于菜单)。

有什么想法吗?我应该补充一点,我们已经将sitecore站点添加到现有项目中,从外部开发,并且可能存在我们目前尚未知道它正在做什么的库代码/配置!

以下是Sitecore.SharedSource.Search.config索引的配置文件

<index id="advancedmaster" type="Sitecore.Search.Index, Sitecore.Kernel">
            <param desc="name">$(id)</param>
            <param desc="folder">advanced_master</param>
            <Analyzer ref="search/analyzer" />
            <locations hint="list:AddCrawler">
              <master type="Sitecore.SharedSource.Search.Crawlers.AdvancedDatabaseCrawler,Sitecore.SharedSource.Search">
                <Database>master</Database>
                <Root>/sitecore/content</Root>
                <IndexAllFields>true</IndexAllFields>

                <include hint="list:ExcludeField">
                  <!-- __revision field -->
                  <fieldId>{8CDC337E-A112-42FB-BBB4-4143751E123F}</fieldId>
                  <!-- __context menu field -->
                  <fieldId>{D3AE7222-425D-4B77-95D8-EE33AC2B6730}</fieldId>
                  <!-- __security field -->
                  <fieldId>{DEC8D2D5-E3CF-48B6-A653-8E69E2716641}</fieldId>
                  <!-- __renderings field -->
                  <fieldId>{F1A1FE9E-A60C-4DDB-A3A0-BB5B29FE732E}</fieldId>
                </include>

                <fieldCrawlers hint="raw:AddFieldCrawlers">
                  <fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.LookupFieldCrawler,Sitecore.SharedSource.Search" fieldType="Droplink" />
                  <fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.DateFieldCrawler,Sitecore.SharedSource.Search" fieldType="Datetime" />
                  <fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.DateFieldCrawler,Sitecore.SharedSource.Search" fieldType="Date" />
                  <fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.NumberFieldCrawler,Sitecore.SharedSource.Search" fieldType="Number" />
                </fieldCrawlers>

                <!-- If a field type is not defined, defaults of storageType="NO", indexType="UN_TOKENIZED" vectorType="NO" boost="1f" are applied-->
                <fieldTypes hint="raw:AddFieldTypes">
                  <!-- Text fields need to be tokenized -->
                  <fieldType name="single-line text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="multi-line text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="word document" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="html" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="rich text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="memo" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <!-- Multilist based fields need to be tokenized to support search of multiple values -->
                  <fieldType name="multilist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="treelist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="treelistex" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <fieldType name="checklist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                  <!-- Legacy tree list field from ver. 5.3 -->
                  <fieldType name="tree list" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
                </fieldTypes>
              </master>
            </locations>
          </index>

2 个答案:

答案 0 :(得分:1)

问题是我们仍然在这些新闻项目上启用了工作流程(我们希望它不用于测试)..并且父项目处于需要审核的状态,因此它没有出现在搜索结果中。

感谢您的建议 - 所有这些都增添了知识之海!

答案 1 :(得分:0)

您是否意外排除了模板而不是包含模板?

<include hint="list:ExcludeTemplate"> 
    <template>ID HERE</template>  
</include>

<include hint="list:IncludeTemplate">
   <template>ID HERE</template>  
</include>

您也可能错误地列出了模板。每个人都需要有不同的名字。

<include hint="list:IncludeTemplate">
   <news>NEWS ID HERE</news>
   <event>EVENT ID HERE</event>
</include>