基于基本模板的 Sitecore 索引

Sitecore Indexing based off of base template

我正在制作自定义索引,但我需要它来仅索引具有特定基本模板或具有特定模板名称的项目。
我将基本模板 ID 添加到 "include hint="list:AddIncludedTemplate"" 但它只使用精确的模板 ID 匹配并且不允许模板名称。
我猜我需要覆盖一些东西但不确定从哪里开始。这是在 Sitecore 8.2 上。

你可以在这里找到你需要的东西:https://ggullentops.blogspot.be/2016/02/custom-indexes-in-sitecore-habitat.html

For the included templates in the document options I was searching for another solution so I decided to throw my question on the Sitecore Slack Helix/Habitat channel and ended up in a discussion with Thomas Eldblom and Sitecore junkie Mike Reynolds. Thomas came up with the idea to hook into the index process to enable it to include base templates and Mike kept pushing me to do it and so.. I wrote an extension to configure your index based on base templates.

它是允许您在索引配置中定义它的自定义代码:

<include hint="list:AddIncludedBaseTemplate">
    <BaseTemplate1>{...}</BaseTemplate1>
</include>