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

バージョンの不一致?

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

于 2010-11-22T18:31:59.090 に答える
0

ファイル bin/libmySQL.dll を、公式の PHP ディストリビューションphp-5.2.1-Win32.zipの MySql バージョン5.0.37と同じものに置き換えるだけです。

于 2013-03-14T11:27:41.083 に答える
-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 に答える
-1

libmysqlclient15-dev パッケージのバージョンを libmysqlclient15 のバージョンと同じにする必要があります。あなたは?

于 2009-09-16T07:58:20.557 に答える