我有一个sitecore 6.2站点除了系统索引之外没有lucene索引。我试图添加这个新的简单索引:
<index id="videoIndex" type="Sitecore.Search.Index, Sitecore.Kernel" >
<param desc="name">$(id)</param>
<param desc="folder">IndexFolder</param>
<Analyzer ref="search/analyzer" />
<templates hint="list:AddTemplate">
<template>{854D2F45-3261-45A8-9E52-64D96B5D54E5}</template>
</templates>
<fields hint="raw:AddField">
<field target="category">Categories</field>
<field target="date">__updated</field>
</fields>
</index>
添加后,浏览sitecore网站上的任何页面都会出现以下错误:
Could not find add method: AddTemplate (type: Sitecore.Search.Index)
使用lucene 2.3.1.3,.NET 3.5。
答案 0 :(得分:3)
<index/>
元素的'type'属性引用Sitecore.Search.Index
类,该类不包含AddTemplate
和AddField
等方法。您似乎应该参考Sitecore.Data.Indexing.Index
。在web.config中查看<index id="system" ... />
。
希望这有帮助。