coreseek配置文件
#MySQL数据源配置,详情请查看:http://www.coreseek.cn/products-install/mysql/ #请先将var/test/documents.sql导入数据库,并配置好以下的MySQL用户密码数据库 #源定义 source new { type = mysql sql_host = 127.0.0.1 sql_user = root sql_pass = jcaNgtX888MySQL666 sql_db = newjcangdb sql_port = 3306 sql_query_pre = SET NAMES utf8 sql_query_pre = SET SESSION query_cache_type=OFF sql_query_pre = REPLACE INTO sph_counter SELECT 1,MAX(id) FROM article sql_query = SELECT * FROM article where id <= (select max_doc_id from sph_counter where counter_id=1) sql_attr_timestamp = create_time sql_query_info_pre = SET NAMES utf8 #命令行查询时,设置正确的字符集 sql_query_info = SELECT id,title,url,thumb_img_number,attribute,create_time,thumb_img,description,click_count FROM article WHERE id=$id #命令行查询时,从数据库读取原始数据信息 } #index定义 index new { source = new #对应的source名称 path = /usr/local/coreseek/var/data/article #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/... docinfo = extern mlock = 0 morphology = none min_word_len = 1 min_prefix_len = 0 min_infix_len = 1 html_strip = 0 #中文分词配置,详情请查看:http://www.coreseek.cn/products-install/coreseek_mmseg/ charset_dictpath = /usr/local/mmseg/etc/ #BSD、Linux环境下设置,/符号结尾 #charset_dictpath = etc/ #Windows环境下设置,/符号结尾,最好给出绝对路径,例如:C:/usr/local/coreseek/etc/... charset_type = zh_cn.utf-8 } #增量索引 source add:new { sql_query_pre = SET NAMES utf8 sql_query = SELECT * FROM jc_article where id > (select max_doc_id from sph_counter where counter_id=1) sql_query_post_index= REPLACE INTO sph_counter SELECT 1,MAX(id) FROM jc_article } index add:new { source = add path = /usr/local/coreseek/var/data/article_add } #全局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 = /usr/local/coreseek/var/log/searchd_mysql.pid #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/... log = /usr/local/coreseek/var/log/searchd_mysql.log #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/... query_log = /usr/local/coreseek/var/log/query_mysql.log #请修改为实际使用的绝对路径,例如:/usr/local/coreseek/var/... }