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

安装好所有的内容 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  运行通过 正常搜索~~

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值