Php 建立狮身人面像
呵呵,别嘲笑我,只是想在我当地的笨蛋身上安装斯芬克斯,我以前没有这样做过,所以我可能在做傻事 这是我的sphinx.conf文件:Php 建立狮身人面像,php,mysql,indexing,sphinx,Php,Mysql,Indexing,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, ti
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.
这个问题的原因可能是什么?
谢谢。您需要使libmysqlclient15开发包版本与libmysqlclient15的版本相同。是吗?您需要使libmysqlclient15开发包版本与libmysqlclient15的版本相同。是吗?没有什么明显的。我已经用这些列创建了一个表,在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>
没有什么明显的。我已经用这些列创建了一个表,在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>
版本不匹配
版本不匹配
只需将文件bin/libmySQL.dll替换为官方PHP distributivePHP-5.2.1-Win32.zip的MySql版本5.0.37中的文件bin/libmySQL.dll只需将文件bin/libmySQL.dll替换为官方PHP distributivePHP-5.2.1-Win32.zip中的文件bin/libmySQL.dll