分类: BSD
2010-08-28 13:06:56
一、安装coreseek
A、安装环境配置,为安装coreseek做准备
#pkg_add -r autoconf262 automake110 libtool mysql50-client libxml2 expat
#fetch#tar xzvf coreseek-3.2.13.tar.gz#cd coreseek-3.2.13
#cd mmseg-3.2.13#./bootstrap#./configure –prefix=/usr/local/mmseg3#make#make install
#cd ../
#cd csft-3.2.13
#./configure –prefix=/usr/local/coreseek –without-python –without-mysql –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/
#make
#make install
#/usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/sphinx-min.conf.dist
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘/usr/local/coreseek/etc/sphinx-min.conf.dist’…total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avgtotal 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
##重新安装coreseek,以支持mysql数据源和xml数据源
#cd csft-3.2.13#./configure –prefix=/usr/local/coreseek –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/#make#make install
#cd testpack# /usr/local/coreseek/bin/indexer -c etc/csft.conf
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avgtotal 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
# /usr/local/coreseek/bin/indexer -c etc/csft.conf –all
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…indexing index ‘xml’…collected 3 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 3 docs, 7585 bytestotal 0.075 sec, 101043 bytes/sec, 39.96 docs/sectotal 2 reads, 0.000 sec, 5.6 kb/call avg, 0.0 msec/call avgtotal 7 writes, 0.000 sec, 3.9 kb/call avg, 0.0 msec/call avg
# /usr/local/coreseek/bin/indexer -c etc/csft.conf xml
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…indexing index ‘xml’…collected 3 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 3 docs, 7585 bytestotal 0.069 sec, 109614 bytes/sec, 43.35 docs/sectotal 2 reads, 0.000 sec, 5.6 kb/call avg, 0.0 msec/call avgtotal 7 writes, 0.000 sec, 3.9 kb/call avg, 0.0 msec/call avg
# /usr/local/coreseek/bin/search -c etc/csft.conf
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…index ‘xml’: query ”: returned 3 matches of 3 total in 0.093 secdisplaying matches:1. document=1, weight=1, published=Thu Apr 1 22:20:07 2010, author_id=12. document=2, weight=1, published=Thu Apr 1 23:25:48 2010, author_id=13. document=3, weight=1, published=Thu Apr 1 12:01:00 2010, author_id=2words:
# /usr/local/coreseek/bin/search -c etc/csft.conf -a Twittter和Opera都提供了搜索服务
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…index ‘xml’: query ‘Twittter和Opera都提供了搜索服务 ‘: returned 3 matches of 3 total in 0.038 secdisplaying matches:1. document=3, weight=24, published=Thu Apr 1 12:01:00 2010, author_id=22. document=1, weight=4, published=Thu Apr 1 22:20:07 2010, author_id=13. document=2, weight=3, published=Thu Apr 1 23:25:48 2010, author_id=1words:1. ‘twittter’: 1 documents, 3 hits2. ‘和’: 3 documents, 15 hits3. ‘opera’: 1 documents, 25 hits4. ‘都’: 2 documents, 4 hits5. ‘提供’: 0 documents, 0 hits6. ‘了’: 3 documents, 18 hits7. ‘搜索’: 2 documents, 5 hits8. ‘服务’: 1 documents, 1 hits
# /usr/local/coreseek/bin/searchd -c etc/csft.conf
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2010,Beijing Choice Software Technologies Inc ()using config file ‘etc/csft.conf’…listening on all interfaces, port=9312
/usr/local/coreseek/bin/searchd -c etc/csft.conf –stop