Kooboo 加Search功能 必须先ReBuild Index Data

 
加Search功能
 
有几个要点
1. 需要在Kooboo 必须先 ReBuild Index Data
2. 需要在要搜索的page中启用搜索索引
 
 
 
 
搜索的代码
@using Kooboo.CMS.Content.Models
@using Kooboo.CMS.Search
@{ var result = Repository.Current.Search("Dolor", 1, 10); }
@result.TotalItemCount
@foreach (var item in result)
{
    <p>@item.Title @item.HighlightedTitle</p>
    <p>@item.HighlightedBody</p>
}
 
 
Did you have add the search index setting, the search index setting must to add to enable the content indexing.
 
 
posted @ 2015-01-11 22:07  iDEAAM  阅读(401)  评论(0编辑  收藏  举报