问鼎资讯

Discuz! X2 sphinx全文搜索安装配置实战

admin2011-06-28 16:00
    listen              = 3312

#posts
{

min_word_len = 1
    sql_port                = 3306
    docinfo            = extern
    sql_query_pre            =

修改sphinx配置文件etc\csft.conf

U+0CE6..U+0CEF, U+0D05..U+0D39, U+0D60,U+0D61, U+0D66..U+0D6F, U+0D85..U+0DC6, \
U+011D,U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, \

现在解压缩coreseek-3.2.14-win32.zip ,比如解压到D:/ coreseek/ ,现在我们切换到这个目录来说。

    sql_attr_uint            = digest
}

    sql_attr_uint            = tid

#全局indexer定义
U+3040..U+309F, U+30A0..U+30FF,U+31F0..U+31FF, U+AC00..U+D7AF, U+1100..U+11FF, \
 if($srchtxt && $_G['setting']['sphinxon']) {

U+0152->U+0153,U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159,\
U+0AE6..U+0AEF, U+0B05..U+0B39,U+0B5C..U+0B61, U+0B66..U+0B6F, U+0B71, U+0B85..U+0BB9, \
U+017B->U+017C,U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, \
    log                 = var/log/searchd_discuzx.log #windows下最好用全路径
    sql_query_pre           = SET SESSION query_cache_type=OFF

    sql_query                = SELECT p.pid AS id,p.tid,p.subject,p.message,t.digest,t.displayorder,t.authorid,t.lastpost,t.special \

后面分钟的单词写错了,我不知道是不是他们故意的,邪恶下~~

{
    source            = posts_minute
    #charset_dictpath = /usr/local/mmseg3/etc/    #BSD、Linux环境下设置,/符号结尾
U+A000..U+A48F, U+4E00..U+9FBF,U+3400..U+4DBF, U+20000..U+2A6DF, U+F900..U+FAFF, \
    sql_query_pre            = SET NAMES UTF8     (这里如果数据库是GBK的就修改为gbk,下面所有SET NAME设置同这里)
{
}

U+0175,U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, \
U+0621..U+063A, U+01B9,U+01BF, U+0640..U+064A, U+0660..U+0669, U+066E, U+066F, \
    seamless_rotate        = 0
    sql_attr_uint            = authorid
U+0167,U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, \
    sql_query_pre            =
U+0159,U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, \
index posts
U+014B,U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, \
                                FROM pre_forum_thread AS t \
    sql_attr_uint            = authorid
source posts_minute : posts
    morphology        = none
                                WHERE p.pid>=$start AND p.pid<=$end

U+0143->U+0144,U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, \
ngram_len = 1

U+0671..U+06D3, U+06F0..U+06FF,U+0904..U+0939, U+0958..U+095F, U+0960..U+0963, \

#posts_minute

    sql_query_range            = SELECT (SELECT MIN(pid) FROM pre_forum_post),max_doc_id FROM sph_counter WHERE counter_id=2
    query_log           = var/log/query_discuzx.log #windows下最好用全路径
min_infix_len = 1
    path            = var/data/threads_minute #windows下最好用全路径

网上大部分说是直接用if($_G['setting']['sphinxon']) {

U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109,\
    max_matches            = 10000
U+3130..U+318F, U+A000..U+A48F,U+A490..U+A4CF
U+017B->U+017C,U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, \
    sql_range_step          = 4096

}

min_word_len = 1
U+0134->U+0135,U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, \
{
    sql_query_pre            = SET NAMES UTF8
    mlock            = 0
    path            = var/data/threads #windows下最好用全路径

{

    sql_query_info            = SELECT * FROM pre_forum_thread WHERE tid=$id
    sql_query_pre           = SET SESSION query_cache_type=OFF
    charset_debug   =   0

    sql_query_range            = SELECT max_doc_id+1,(SELECT MAX(pid) FROM pre_forum_post) FROM sph_counter WHERE counter_id=2
U+016E->U+016F,U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175,\

    sql_attr_timestamp        =lastpost

    mem_limit            = 256M
新闻咨询

网站首页 | 网站首页 | 走进问鼎 | 产品和服务 | 成功案例 | 新闻资讯 | 联系我们 | 问鼎社区

Copyright since 2005,问鼎科技(58wd.com)      服务电话:400-666-4165       地址:成都市IT大道蜀清路239号       蜀ICP备10202221号

  • 点击这里给我发消息
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 点击这里给我发消息
  • 点击这里给我发消息