1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

交流 IPS 4.0系列安装Sphinx 2.2.9 ,支持中文搜索

本帖由 admin2015-06-28 发布。版面名称:IP.Board中文版

  1. admin

    admin 管理员 管理成员

    注册:
    2011-11-01
    帖子:
    3,671
    赞:
    2,425
    转载自:https://ziy.cc/threads/31489/

    默认IPS不支持中文搜索,很操蛋.必须用Sphinx才可以, 但还不支持coreseek 4.1 ,版本太老了.
    所以必须用新版本
    sphinx 下载安装
    http://sphinxsearch.com/downloads/sphinx-2.2.9-release.tar.gz
    tar zxvf sphinx-2.2.9-release.tar.gz
    cd sphinx-2.2.9-release
    ./configure --prefix=/usr/lcoal/sphinx
    make && make install

    配置文件:
    代码:
    searchd
    {
        listen                  = 127.0.0.1:9312:mysql41
        max_children            = 30
        pid_file                = /var/sphinx/buildsearchd.pid
        query_log        = /usr/local/sphinx/var/log/query.log
        log            = /usr/local/sphinx/var/log/searchd.log
        preopen_indexes         = 0
        collation_server        = utf8_general_ci
        workers                 = threads
     
    }
    
    index xfips
    {
        type                    = rt
        path                    = /var/sphinx/data
    ngram_len = 1
    ngram_chars        = U+3000..U+2FA1F
    min_word_len        = 1
        rt_field                = index_title
        rt_field                = index_content
        rt_field                = index_tags
        rt_attr_bigint          = index_object_id
        rt_attr_bigint          = index_item_id
        rt_attr_bigint          = index_container_id
        rt_attr_bigint          = index_author
        rt_attr_bigint          = index_views
        rt_attr_bigint          = index_num_comments
        rt_attr_bigint          = index_num_reviews
        rt_attr_json           = index_permissions
        rt_attr_timestamp       = index_date_created
        rt_attr_timestamp       = index_date_updated
        rt_attr_string          = index_class
        rt_attr_uint            = index_class_id
        rt_attr_uint            = index_hidden
    }
    启动
    /usr/local/sphinx/bin/searchd
     
  2. xinli_zhao

    xinli_zhao VIP会员

    注册:
    2012-03-03
    帖子:
    86
    赞:
    23
    以前试过,没有成功,后来用XF以后,安装ES搜索插件,非常好用,系统升级直接默认即可,很多插件也支持ES,这点非常好
    IPB在3中就整合了sphinx,一直没有试成功
     
正在加载...