I have a sitecore 6.2 site that had no lucene indexes besides the system index. I tried to add this new simple index:
<index id="videoIndex" type="Sitecore.Search.开发者_JAVA技巧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>
Once I add this, browsing to any page on the sitecore site gives the following error:
Could not find add method: AddTemplate (type: Sitecore.Search.Index)
Using lucene 2.3.1.3, .NET 3.5.
The 'type' attribute of the <index/>
element references Sitecore.Search.Index
class, which doesn't contain methods like AddTemplate
and AddField
. It seems you should reference Sitecore.Data.Indexing.Index
instead. Take a look at <index id="system" ... />
in web.config.
Hope this helps.
精彩评论