2

呵呵,不要笑我,只是想在我当地的 WAMP 上设置 Sphinx,我以前没有这样做过,所以我可能在做一些愚蠢的事情。

这是我的 sphinx.conf 文件:

source code
{
    type = mysql
    sql_host = localhost
    sql_user = root
    sql_pass =
    sql_db = ****
    sql_port = 3306
    sql_query = SELECT id, language_id, category_id, title, description, UNIX_TIMESTAMP(time_posted) AS time_posted FROM codes
    sql_attr_uint = language_id
    sql_attr_uint = category_id
    sql_attr_timestamp = time_posted
    sql_query_info = SELECT id FROM codes WHERE id=$id
}

index code
{
    source = code
    path = C:/Program Files/Wampserver 2/sphinx/var/data/sphinx/code
    morphology = stem_en
    min_word_len = 3
    min_prefix_len = 0
}

searchd
{
    port = 3312
    log = C:/Program Files/Wampserver 2/sphinx/var/log/searchd/searchd.log
    query_log = C:/Program Files/Wampserver 2/sphinx/var/log/searchd/query.log
    pid_file = C:/Program Files/Wampserver 2/sphinx/var/log/searchd/searchd.pid
}

当我尝试建立索引时,我收到了这个错误:

ERROR: index 'code': column number 1 has no name.

这个问题的原因可能是什么?谢谢。

4

4 回答 4

0

只需将文件 bin/libmySQL.dll 替换为来自官方 PHP 发行版php-5.2.1-Win32.zip的 MySql 版本 5.0.37 中的相同文件

于 2013-03-14T11:27:41.083 回答
0

版本不匹配?

http://www.sphinxsearch.com/forum/view.html?id=937

于 2010-11-22T18:31:59.090 回答
-1

您需要使 libmysqlclient15-dev 包版本等于 libmysqlclient15 的版本。你?

于 2009-09-16T07:58:20.557 回答
-1

没有什么明显的。我用这些列创建了一个表,在 Mac 和 Windows 机器上运行索引,并且两次都正确索引。我使用的是 sphinx 0.9.9-rc2,可能是版本问题?

C:\Sphinx\bin>indexer.exe --config c:\Sphinx\test.conf
Sphinx 0.9.9-rc2 (r1785)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file 'c:\Sphinx\test.conf'...
WARNING: key 'port' is deprecated in c:\Sphinx\test.conf line 27; use 'listen' i
nstead.
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

C:\Sphinx\bin>
于 2009-09-16T10:01:35.567 回答