Sphinx setup
Hehe, don't laugh at me just trying to set up the Sphinx on my local WAMP, I haven't done that before, so I'm probably doing something stupid.
This is my sphinx.conf file:
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
}
When I try to index, I get this error:
ERROR: index 'code': column number 1 has no name.
What could be causing this problem? Thank.
+2
james
source
to share
4 answers
Nothing is obvious. I created a table with these columns, ran the index on both Mac and Windows, and it indexes correctly both times. I am using sphinx 0.9.9-rc2, maybe this is a version issue?
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>
-1
source to share