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

本帖由 Xiao.T2015-06-23 发布。版面名称:IP.Board 综合交流

  1. Xiao.T

    Xiao.T 管理员 技术员

    默认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

    demo http://poneigou.com 破内购
     
    最后编辑: 2015-06-24
正在加载...