从100本名书里边选出来的名言

来源:互联网 发布:java招聘石家庄 编辑:程序博客网 时间:2024/04/28 02:27

安装好所有的内容 coreseek mmseg

/usr/local/coreseek/bin/indexer --config /usr/local/coreseek/etc/info.conf --all

 

创建索引出现

Coreseek Full Text Server 3.1
 Copyright (c) 2006-2008 coreseek.com
using config file '/usr/local/sphinx/etc/sphinx.conf'...
indexing index 'tpzj_84'...
Unigram dictionary load Error
段错误

 

反复检查字典路径 确认正确

从新创建索引 仍然这样的错误

 

修改字典路径 无果 仍然如此

 

介绍下配置情况  mysql使用字符 gbk

配置文件中的配置如下

 

source:

     sql_query_pre = SET NAMES 'gbk'

    

index:


        charset_type = zh_cn.gbk

        #charset_type = utf-8
        # 'utf-8' default value is
        charset_table         = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
        charset_dictpath = /usr/local/coreseek/dict/

 

 

 

 

字典操作:

 

产生字典
cd /root/soft/mmseg-3.1/data
/usr/local/mmseg/bin/mmseg -u unigram.txt
产生了unigram.txt.uni,移到相应目录。
cp unigram.txt.uni /usr/local/coreseek/dict/uni.lib

创建 /usr/local/coreseek/dict/mmseg.ini 内容:


[mmseg]
merge_number_and_ascii=1;
number_and_ascii_joint=-;
compress_space=0;
seperate_number_ascii=1;

#merge_number_and_ascii: 字母和数字连续出现是非切分
#number_and_ascii_joint:连接数字和字母可用的符号,如'-' '.' 等
#compress_space:暂时无效
#seperate_number_ascii:是否拆分数字,如 1988 -> 1/x 9/x 8/x 8/x

 

 

所有的操作都完成。创建索引均不行。

 

 

gg baidu 下 发现有这样一条说明

 

需要把/coreseek/dict/unigram.txt.uni 文件重命名 为 uni.lib

 

尝试操作 。。。。

 

再次运行 /usr/local/coreseek/bin/indexer --config /usr/local/coreseek/etc/info.conf --all

 

 

 

ok  运行通过 正常搜索~~

 

 

 

 

原创粉丝点击