发布于 2015-06-14 10:08:36 | 230 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Coreseek 中文全文检索引擎

Coreseek 是一款中文全文检索/搜索软件,以GPLv2许可协议开源发布,基于Sphinx研发并独立发布,专攻中文搜索和信息处理领域,适用于行业/垂直搜索、论坛/站内搜索、数据库搜索、文档/文献检索、信息检索、数据挖掘等应用场景,用户可以免费下载使用


搭建coreseek(sphinx+mmseg3)安装

[第一步] 先安装mmseg3

cd /root/install  
wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz  
tar zxvf coreseek-4.1-beta.tar.gz  
  
cd coreseek-4.1-beta  
cd mmseg-3.2.14  
./bootstrap  
./configure --prefix=/server/mmseg3  
make && make install  
  
遇到的问题:  
error: cannot find input file: src/Makefile.in  
或者遇到其他类似error错误时...  
  
解决方案:  
依次执行下面的命令,我运行‘aclocal‘时又出现了错误,解决方案请看下文描述  
  
yum -y install libtool  
  
aclocal  
libtoolize --force  
automake --add-missing  
autoconf  
autoheader  
make clean  

安装好‘libtool‘继续从‘aclocal‘开始执行上面提到的一串命令,执行完后再运行最开始的安装流程即可。

[第二步] 安装coreseek

##安装coreseek  
$ cd csft-3.2.14 或者 cd csft-4.0.1 或者 cd csft-4.1  
$ sh buildconf.sh                                         #输出的warning信息可以忽略,如果出现error则需要解决  
$ ./configure --prefix=/server/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/server/mmseg3/include/mmseg/ --with-mmseg-libs=/server/mmseg3/lib/ --with-mysql  
##如果提示mysql问题,可以查看MySQL数据源安装说明   http://www.coreseek.cn/product_install/install_on_bsd_linux/#mysql  
$ make && make install  
$ cd ..
  
##命令行测试mmseg分词,coreseek搜索(需要预先设置好字符集为zh_CN.UTF-8,确保正确显示中文)  
$ cd /root/install/coreseek-4.1-beta/testpack  
$ cat /root/install/coreseek-4.1-beta/testpack/var/test/test.xml    #此时应该正确显示中文  
$ /server/mmseg3/bin/mmseg -d /server/mmseg3/etc /root/install/coreseek-4.1-beta/testpack/var/test/test.xml
$ /server/coreseek/bin/indexer -c /root/install/coreseek-4.1-beta/testpack/etc/csft.conf --all #此时应该首先修改csft.conf里的配置参数(否则会报错)
$ /server/coreseek/bin/search -c /root/install/coreseek-4.1-beta/testpack/etc/csft.conf 网络搜索

出现这个 xmlpipe2 support NOT compiled in. To use xmlpipe2, install missing XML libra  错误

执行以下命令:

  1. yum -y install expat expat-devel  


依次安装后,从新编译coreseek,然后再生成索引,就可以通过了。

结果如下:

Coreseek Fulltext 4.1 [ Sphinx 2.0.2-dev (r2922)]    
Copyright (c) 2007-2011,    
Beijing Choice Software Technologies Inc (http://www.coreseek.com)    
   
using config file ‘etc/csft.conf‘...    
index ‘xml‘: query ‘网络搜索 ‘: returned 1 matches of 1 total in 0.000 sec    
   
displaying matches:    
1. document=1, weight=1590, published=Thu Apr  1 07:20:07 2010, author_id=1    
   
words:    
1. ‘网络‘: 1 documents, 1 hits    
2. ‘搜索‘: 2 documents, 5 hits    


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务