WEB开发网
开发学院CMS教程织梦CMS DedeCMS v5.7全文检索使用说明(sphinx) 阅读

DedeCMS v5.7全文检索使用说明(sphinx)

 2012-03-30 11:55:14 来源:WEB开发网   
核心提示: # 增量索引,从最大id开始 sql_query = SELECT ARC.id,ARC.typeid,ARC.typeid2,ARC.sortrank,ARC.flag,ARC.channel,ARC.ismake,ARC.arcrank,ARC.click,ARC.title,ARC.shorttitle,A
   # 增量索引,从最大id开始
   sql_query = SELECT ARC.id,ARC.typeid,ARC.typeid2,ARC.sortrank,ARC.flag,ARC.channel,ARC.ismake,ARC.arcrank,ARC.click,ARC.title,ARC.shorttitle,ARC.color,ARC.writer,ARC.source,ARC.litpic,ARC.pubdate,ARC.senddate,ARC.mtype,ARC.description,ARC.badpost,ARC.goodpost,ARC.scores,ARC.lastpost,ARC.keywords,ARC.mid,ART.body FROM dede_archives AS ARC LEFT JOIN dede_addonarticle AS ART ON ARC.id = ART.aid WHERE ARC.id > ( SELECT maxaid FROM dede_sphinx WHERE countid=1 )
   #从SQL读取到的值必须为整数
   
   sql_query_post = REPLACE INTO dede_sphinx SELECT 1, MAX(id) FROM dede_archives
   
   sql_attr_uint          = typeid         
   sql_attr_uint       = typeid2
   sql_attr_uint       = channel
   sql_attr_uint       = click
   sql_attr_uint       = badpost
   sql_attr_uint       = goodpost
   sql_attr_uint       = scores
   sql_attr_uint       = mid
   sql_attr_timestamp  = pubdate   #从SQL读取到的值必须为整数,作为时间属性
   sql_attr_timestamp  = senddate
   sql_attr_timestamp  = lastpost

   #命令行查询时,从数据库读取原始数据信息
   sql_query_info         = SELECT ARC.*,ART.body FROM dede_archives AS ARC LEFT JOIN dede_addonarticle AS ART ON ARC.id = ART.aid WHERE ARC.id=$id  
}

#index定义
index mysql
{
   source         = mysql       #对应的source名称

上一页  1 2 3 4 5 6 7 8 9 10 11  下一页

Tags:DedeCMS 全文检索 使用说明

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接