首页 > 其他 > 详细

Kooboo 加Search功能 必须先ReBuild Index Data

时间:2015-01-11 23:00:40      阅读:648      评论:0      收藏:0      [点我收藏+]
 
加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.
 
 

Kooboo 加Search功能 必须先ReBuild Index Data

原文:http://www.cnblogs.com/haoliansheng/p/4217195.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!