coreseek mmseg分词配置和创建

1.文件格式为

沃尔沃 1
x:1
现代 1
x:1
徐工 1
x:1
住友 1

。。。

3.将生成的符合格式要求的词表粘贴到原词表unigram.txt末尾,保存为unigram_new.txt,并拷贝到mmseg所在的目录下; 

4.生成新的
uni

    /usr/local/mmseg3/bin/mmseg -u /usr/local/mmseg3/etc/unigram_new.txt

    就会生成新的词典文件unigram_new.txt.uni 

5.将新的unigram_new.txt.uni 替换原有的uni.lib
    mv /usr/local/mmseg3/etc/unigram_new.txt.uni /usr/local/mmseg3/etc/uni.lib

6.重新建立索引库、重启searchd
     /usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/c.conf --all --pidfile --rotate
    关闭searchd
      ps auxww | grep searchd
      kill 923230
    启动searchd
    /usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/c.conf --console --pidfile  

    搜索试下就出来了。

注意:需要重启searchd

posted @ 2017-06-28 11:23  zhjahch  阅读(312)  评论(0编辑  收藏  举报