admin

sphinx 配置文件

admin linux 2023-01-10 511浏览 0

对于sphine这中对数据库做全文索引,安装非常简单,而比较困难的就是配置对数据库的调用和mysql索引的字段,这里贴出来一个比较简单的配置文件:

source test{
       type                                        = mysql
       sql_host                               = 192.168.1.159
       sql_user                               = testuser
       sql_pass                              = 123456
       sql_db                                   = dbtest
       sql_port                                = 3306
       sql_query_pre                     = SET NAMES utf8
       sql_query                             = SELECT id,username  FROM user
}
index tset{
       source                                      = test

       path            = /usr/local/coreseek/var/data/                                 
       charset_dictpath = /usr/local/mmseg3/etc/                                               

       charset_type                                = zh_cn.utf-8
}
searchd{
       listen                                      = 9312
       max_matches                      = 10000

         pid_file = /usr/local/coreseek/var/log/dasearchd_mysql.pid         
         log = /usr/local/coreseek/var/log/searchd_mysql.log          
         query_log = /usr/local/coreseek/var/log/query_mysql.log               
}

完成!!

转载请注明:IT运维空间 » linux » sphinx 配置文件

继续浏览有关 LINUX技术 的文章
发表评论