>백엔드 개발 >PHP 튜토리얼 >coreseek增量索引,建立索引后查不出结果

coreseek增量索引,建立索引后查不出结果

WBOY
WBOY원래의
2016-06-23 14:18:321082검색

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			=          }

当我建立索引执行命令coreseek/bin/indexer -c etc/search.conf --all后索引建立成功包括主索引和增量索引,启动服务,查询不出结果,添加记录,执行更新增量索引,在查询可以查询到新增的记录,怎么回事,求帮助~~~~~~~

回复讨论(解决方案)

和这个人的一样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
    
}

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.