Heim > Artikel > Backend-Entwicklung > coreseek增量索引,建立索引后查不出结果
search coreseek index
#增量索引source main{ type = mysql sql_host = 127.0.0.1 sql_user = root sql_pass = 123456 sql_db = reports sql_port = 3306 sql_query_pre = SET NAMES utf8 sql_query_pre = replace into sph_counter select 1,max(id) from search sql_query_range = select 1,max(id) from search sql_range_step = 1000 sql_query = SELECT id,year_id,abstract,keywords,comments,create_time FROM search where id>=$start and id <=$end and id <=(select max_doc_id from sph_counter where counter_id=1) sql_attr_timestamp = create_time sql_attr_uint = comments sql_attr_uint = year_id sql_query_info_pre = SET NAMES utf8 }source delta : main{ sql_query_pre = SET NAMES utf8 sql_query = SELECT id,year_id,abstract,keywords,comments,create_time FROM search where id>=$start and id <=$end and 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 search}#index定义index main{ source = main path = d:/www/ceshi/coreseek/var/data/main docinfo = extern mlock = 0 morphology = none min_word_len = 1 html_strip = 0 charset_dictpath = d:/www/ceshi/coreseek/etc/ charset_type = zh_cn.utf-8}index delta : main{ source = delta path = d:/www/ceshi/coreseek/var/data/main }#全局index定义indexer{ mem_limit = 512M}#searchd服务定义searchd{ listen = 127.0.0.1:9312 read_timeout = 5 max_children = 30 max_matches = 5000 seamless_rotate = 0 preopen_indexes = 0 unlink_old = 1 pid_file = d:/www/ceshi/coreseek/var/log/search_main.pid log = d:/www/ceshi/coreseek/var/log/search_main.log query_log = d:/www/ceshi/coreseek/var/log/search_query.log binlog_path = }
和这个人的一样http://bbs.csdn.net/topics/360094828,他解决了没有贴出方法
和这个人的一样http://bbs.csdn.net/topics/360094828,他解决了没有贴出方法
====================================================================
问题在于你的主索引和增量索引的生成地址是一样的.
*****
把增量索引的path = d:/www/ceshi/coreseek/var/data/main改成别的名字就可以了
=====================================================================
#index定义
index main
{
source = main
path = d:/www/ceshi/coreseek/var/data/main
docinfo = extern
mlock = 0
morphology = none
min_word_len = 1
html_strip = 0
charset_dictpath = d:/www/ceshi/coreseek/etc/
charset_type = zh_cn.utf-8
}
index delta : main
{
source = delta
path = d:/www/ceshi/coreseek/var/data/main
}