然后重新运行aclocal和autoconf
aclocal && autoconf
最后再次运行automake
automake
然后继续mmseg的安装
./configure --prefix=/usr/local/mmseg
make && make install
如果make 报错
There is an easy fix when you get such messages as "X--tag=CXX: command not found".
Just type:
export echo=echo
And try again.
所以输入
export echo=echo
然后再次运行安装
make && make install
安装csft
./configure --prefix=/usr/local/coreseek --with-mysql=/usr/local/mysql --with-mmseg=/usr/local/mmseg --with-mmseg-includes=/usr/local/mmseg/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg/lib/
make && make install
安装完毕后 注意 coreseek 中的配置文件也是csft.conf 而不是 sphinx.conf
cd /usr/local/coreseek/etc
cp sphinx.conf.dist csft.conf
vim csft.conf
有些配置改动如下其他配置内容如上文的sphinx.conf
在索引源中注释掉txt
index main{
#stopwords = G:\data\stopwords.txt
#wordforms =G:\data\wordforms.txt
#exceptions =/data/exceptions.txt
#charset_type = sbcs
#添加下面2行 意思是把中文分词加入到配置文件中
char_type = zh_cn.utf-8
charset_dictpath =/usr/local/mmseg/etc/ #你安装mmseg的目录
}
保存配置
建立索引
cd /usr/local/coreseek/bin
./indexer --all
./search 中文词缀
如何用php去使用sphinx
Sphinx集成到php程序中有两种方式