Coreseek 增量备份

花了一下午。终于把coreseek的配置搞定了。以下是我的配置文件/usr/local/coreseek/etc/csft.conf
source main
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = 密码
sql_db =表名
sql_port = 3306 # optional, default is 3306
sql_query = \
SELECT ID, UNIX_TIMESTAMP(post_date) AS date_added, post_title, post_content \
FROM wp_posts
#sql_attr_uint = group_id
sql_attr_timestamp = date_added
sql_ranged_throttle = 0
sql_query_info = SELECT * FROM wp_posts WHERE id=$id
sql_query_pre = SET NAMES utf8
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM wp_posts
#sql_query = SELECT id, title, body FROM documents \
#WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
}


source delta : main
{
    sql_query_pre = SET NAMES utf8
    sql_query = SELECT ID, UNIX_TIMESTAMP(post_date) AS date_added, post_title, post_content FROM wp_posts \
        WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )

}

index main
{
source = main
path = /usr/local/coreseek/var/data/test1
docinfo = extern
mlock = 0
morphology = none
stopwords = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/stopwords.txt
wordforms = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/wordforms.txt
exceptions = /usr/local/coreseek/var/data/exceptions.txt  #/data/exceptions.txt
min_word_len = 1
charset_type = sbcs
html_strip = 0
}

index delta : main
{
source = delta
path = /usr/local/coreseek/var/data/test1/delta
docinfo = extern
mlock = 0
morphology = none
stopwords = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/stopwords.txt
wordforms = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/wordforms.txt
exceptions = /usr/local/coreseek/var/data/exceptions.txt  #/data/exceptions.txt
min_word_len = 1
charset_type = sbcs
html_strip = 0
}

然后,./indexer  -c ../etc/csft.conf --all 重建整个索引。

在cront中,设置./indexer  delta -c ../etc/csft.conf 做增量索引。设置./indexer  -c ../etc/csft.conf --all 做重建索引。
其实手册里面写的很详细了。http://www.coreseek.cn/docs/coreseek_3.2-sphinx_0.9.9.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值