Skip to content

Instantly share code, notes, and snippets.

@NickMirnov
Created September 22, 2014 09:28
Show Gist options
  • Save NickMirnov/d9417813abaf99f7b7c3 to your computer and use it in GitHub Desktop.
Save NickMirnov/d9417813abaf99f7b7c3 to your computer and use it in GitHub Desktop.
Sphinx engine + chinese stemmer/dictonary install (coreseek)
#resource: http://www.coreseek.cn/products-install/install_on_bsd_linux/
#requirements:
# m4 >= 1.4.13
# autoconf >= 2.65
# automake >= 1.11
# libtool >= 2.2.6b
wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
tar xzvf coreseek-4.1-beta.tar.gz
## install mmseg
cd coreseek-4.1-beta/mmseg-3.2.14
./bootstrap
./configure --prefix=/usr/local/mmseg3
make && make install
#install coreseek
cd ../csft-4.1
sh buildconf.sh
./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql
make && make install
# if compile_error: " sphinxexpr.cpp:1080:43: error: ‘ExprEval’ was not declared in this scope, and no
# | declarations were found by argument-dependent lookup at the point of instantiation
# | [-fpermissive]
# | T val = ExprEval ( this->m_pArg, tMatch ); // 'this' fixes gcc braindamage"
#DO: 1)cd src/
# 2)vim sphinxexpr.cpp
# 3)replace ALL expr.: T val = ExprEval ( this->m_pArg, tMatch ) ==> T val = this-> ExprEval ( this->m_pArg, tMatch )
# 4)cd ..
# 5) make && make install
#test
cd ../testpack
cat var/test/test.xml #此时应该正确显示中文
/usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml
/usr/local/coreseek/bin/indexer -c etc/csft.conf --all
/usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment