#源定义
source mysql
{
type = mysql
# 数据库服务器基本配置信息
sql_host = 192.168.0.103
sql_user = dedev57
sql_pass = dedecms
sql_db = dedecmsv57gbk
sql_port = 3306
# 设定编码,这里我们是gbk编码,如果是utf-8,可以设置:
# sql_query_pre = SET NAMES utf8
sql_query_pre = SET NAMES gbk
# 数据检索增量
sql_range_step = 1000
#当前***新文档id数
sql_query_pre = REPLACE INTO dede_sphinx SELECT 1, MAX(id) FROM dede_archives
#检索条件
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>=$start
AND ARC.id<=$end #sql_query***列id需为整数
#title、body作为字符串/文本字段,被全文索引
# 获取当前***大检索id
sql_query_range = SELECT 1,maxaid FROM dede_sphinx WHERE countid=1
sql_attr_uint = typeid #从SQL读取到的值必须为整数
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
}
source delta
{
type = mysql
# 数据库服务器基本配置信息
sql_host = 192.168.0.103
sql_user = dedev57
sql_pass = dedecms
sql_db = dedecmsv57gbk
sql_port = 3306
sql_query_pre = SET NAMES gbk
# 增量索引,从***大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名称
path = D:/coreseek-3.2.13-win32/var/data/mysql
docinfo = extern
mlock = 0
morphology = none
min_word_len = 1
html_strip = 0
#charset_dictpath = /usr/local/mmseg3/etc/ #BSD、Linux环境下设置,/符号结尾
charset_dictpath = D:/coreseek-3.2.13-win32/etc/ #Windows环境下设置,/符号结尾
charset_type = zh_cn.gbk
}
index delta : mysql
{
min_word_len = 1
source = delta
path = D:/coreseek-3.2.13-win32/var/data/delta.new
}
#全局index定义
indexer
{
mem_limit = 128M
}
#searchd服务定义
searchd
{
listen = 9312
read_timeout = 5
max_children = 30
max_matches = 1000
seamless_rotate = 0
preopen_indexes = 0
unlink_old = 1
pid_file = D:/coreseek-3.2.13-win32/var/log/searchd_mysql.pid
log = D:/coreseek-3.2.13-win32/var/log/searchd_mysql.log
query_log = D:/coreseek-3.2.13-win32/var/log/query_mysql.log
}