如何设置Sphinx以处理位于本地服务器中的数据库?

时间:2015-09-18 20:58:35

标签: xampp sphinx

我正在使用XAMPP来测试我的Web应用程序,我需要使用Sphinx对数据库进行一些复杂的查询。

我正在关注此指南:http://sphinxsearch.com/docs/current.html#intro,我设法按照以下步骤操作:/usr/local/sphinx/bin/indexer --all。我得到这个输出:( sphynx.conf是默认提供的:sphinx.conf.dist

Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/sphinx/etc/sphinx.conf'...
indexing index 'test1'...
collected 4 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 4 docs, 193 bytes
total 0.005 sec, 32377 bytes/sec, 671.02 docs/sec
indexing index 'test1stemmed'...
collected 4 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 4 docs, 193 bytes
total 0.001 sec, 110222 bytes/sec, 2284.40 docs/sec
skipping non-plain index 'dist1'...
skipping non-plain index 'rt'...
total 8 reads, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
total 24 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg

我没有看到任何错误,所以我继续尝试使用此查询测试索引:SELECT * FROM test1 WHERE MATCH('my document');;我得到一个奇怪的SQL语法错误,然后我尝试了这个:SELECT * from test1 WHERE 1我得到了这个:#1146 - Table 'test.test1' doesn't exist。 我正在努力解决这个错误,你知道是什么导致了这个吗?

1 个答案:

答案 0 :(得分:0)

似乎您连接到MySQL而不是Sphinx。尝试执行:

SHOW DATABASES;