Coreseek-全文检索工具

windows执行代码
1、coreseek_main.bat
e:\coreseek\bin\indexer -c E:\coreseek\etc\csft_mysql.conf --all --rotate
2、coreseek_merge.bat
e:\coreseek\bin\indexer -c E:\coreseek\etc\csft_mysql.conf --merge main increment --rotate --merge-dst-range deleted 0 0
3、coreseek_increment.bat
e:\coreseek\bin\indexer -c E:\coreseek\etc\csft_mysql.conf increment --rotate

#MySQL数据源配置
#请先将var/test/1193379199.sql导入数据库,并配置好以下的MySQL用户密码数据库
源文件csft_mysql.conf
#源定义

source main
{
    type                    = mysql
    sql_host                = 127.0.0.1
    sql_user                = root
    sql_pass                = 1193379199
    sql_db                  = www_didiche_cn_h
    sql_port                = 3306
    sql_query_pre            = SET NAMES utf8
    sql_query_pre = REPLACE INTO e_sphinx SELECT 5,MAX(itemid) FROM e_sell_5
    sql_query = SELECT itemid, vip, edittime as sorttime, username, title, introduce,status FROM e_sell_5 WHERE itemid<=(SELECT maxid FROM e_sphinx WHERE moduleid = 5)
    #sql_field_string = title
	sql_attr_bigint = vip
	sql_attr_bigint = status
	sql_attr_timestamp = sorttime
    sql_query_info = SELECT * FROM e_sell_5 WHERE itemid=$id
}
source increment:main
{
    sql_query_pre = SET NAMES utf8
    sql_query = SELECT itemid, vip, edittime as sorttime, username, title, introduce,status FROM e_sell_5 WHERE itemid>(SELECT maxid FROM e_sphinx WHERE moduleid = 5)
}
#index定义
index main
{
    source            = main             #对应的source名称
    path            = E:/coreseek/var/data/mysql #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
    docinfo            = extern
    mlock            = 0
    morphology        = none
    min_word_len        = 1
    html_strip                = 0
 
    #中文分词配置
    #charset_dictpath = /usr/local/mmseg3/etc/ #BSD、Linux环境下设置,/符号结尾
    charset_dictpath = E:/coreseek/etc/
	#Windows环境下设置,/符号结尾,最好给出绝对路径,例如:C:/usr/local/coreseek/etc/...
    charset_type        = zh_cn.utf-8
	ngram_len = 0
}
index increment:main
{
    source = increment
    path = E:/coreseek/var/data/increment
}
#全局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 = E:/coreseek/var/log/searchd_mysql.pid  #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
    log = E:/coreseek/var/log/searchd_mysql.log        #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
    query_log = E:/coreseek/var/log/query_mysql.log #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/...
}

1.创建主索引:
indexer -c d:\coreseek\etc\csft_mysql.conf --all --rotate

2.添加数据

3.再创建增量索引:
indexer -c d:\coreseek\etc\csft_mysql.conf increment --rotate

4.合并索引:
indexer -c d:\coreseek\etc\csft_mysql.conf --merge main increment --rotate --merge-dst-range deleted 0 0

search -c d:\coreseek\etc\csft_mysql.conf 供应
search -c d:\coreseek\etc\csft_mysql.conf apple

安装
bin\searchd --install --config e:/coreseek/etc/csft_mysql.conf

indexer -c e:\coreseek\etc\csft_mysql.conf --all --rotate

searchd --config --config e:/coreseek/etc/csft_mysql.conf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

net1193379199

您的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值