Sitecore Lucene Index不包括所有字段

时间:2012-04-30 15:45:07

标签: lucene indexing sitecore field

我创建了一个使用默认数据库搜寻器的新索引。我无法索引我指定的5个模板上的所有字段。

我正在使用IndexViewer模块检查上述字段。在可用字段中,它列出了我想要编入索引但仅索引以下字段的所有字段 - _url,_group,_name和_tags。

我还写了一些代码来测试索引字段,我得到了理想的结果。我只需要我的索引来包含指定模板上的所有字段。下面是我对索引的配置。

<index id="Articles" type="Sitecore.Search.Index, Sitecore.Kernel">
<param des="name">$(id)</param>
<param des="folder">__articles</param> 
<Analyzer ref="search/analyzer"/>            
<locations hint="list:AddCrawler">
    <customindex type="Sitecore.Search.Crawlers.DatabaseCrawler, Sitecore.Kernel">
        <Database>web</Database>
        <Root>/sitecore/content/[websitehome]</Root>
        <Tags>articles</Tags>
        <IndexAllFields>true</IndexAllFields>
        <include hint="list:IncludeTemplate">
            <template1>{C4663677-909E-4C4D-AB3E-78AADBB36CF7}</template1>
            <template2>{444D1797-1EA9-46F2-988D-2211CF926501}</template2>
            <template3>{1A859C38-FFFA-4102-BF7F-9E670495C3AF}</template3>
            <template4>{6EA89465-C6C4-4643-9589-188FBB180883}</template4>
            <template5>{52F0AB89-E9C3-4D10-9242-ACB669841C41}</template5>               
        </include>
    </customindex>              
    </locations>

3 个答案:

答案 0 :(得分:1)

尝试使用Lukeall工具来观察索引 - IndexViewer可能不会显示未存储的字段。要使用Lukeall,只需选择C:\ inetpub \ wwwroot \ Sitecore \ Data \ _dex__articles文件夹,选中“只读”和“强制解锁”,然后单击“确定”。

答案 1 :(得分:1)

要使Lucene存储索引值 - 在字段定义上设置 storageType =“YES”

 <fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">
        <fieldNames hint="raw:AddFieldByFieldName">
          <field fieldName="_uniqueid" storageType="YES"

答案 2 :(得分:0)

我想出来了。索引包括的字段不是它们的值。不确定这是否是索引所需的功能,但是当我查询它时,我得到了结果。

相关问题