How can I get the Advanced Database Crawler to index the item name

微笑、不失礼 提交于 2019-12-13 20:07:26

问题


I'm trying to switch my Sitecore application's search from the "old" indexes (Sitecore.Data.Indexing) to the "new" indexes (Sitecore.Search).

I used to have an index that explicitly listed the fields that I wanted indexed. The Item's name was one of these:

<field target="name">@name</field>

The new indexes, along with the Advanced Database Crawler allow you to have include fields and exclude fields. I've set the index IncludeAllFields value to false, as there are more fields I want to leave out than I want to index. And I add the fields I want via includes:

<include hint="list:IncludeField">
    <!-- Field 1 -->
    <fieldId1>{396CA18D-0E46-437E-9237-C10FDB217666}</fieldId1>
    <!-- Field 2 -->
    <fieldId2>{396CA18D-0E46-437E-9237-C10FDB217666}</fieldId2>
    <!-- Field 3 -->
    <fieldId3>{CC45947E-A22C-44E3-9652-32E519DABC7F}</fieldId3>
</include>

The problem is I can't figure out how to add the item's name with these new indexes. As far as I know the item's name isn't in a field. I tried looking at a sample item's fields after calling item.Fields.ReadAll() and looking through them all, but I couldn't see the item's name.

Is the item's name in a field that I can add to the include list, or is there another approach?

Thanks

来源:https://stackoverflow.com/questions/11211496/how-can-i-get-the-advanced-database-crawler-to-index-the-item-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!