views:

546

answers:

2

Hehe, don't laugh at me, just trying to set up Sphinx on my local WAMP, I haven't done this before so I'm probably doing something silly.

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 am getting this error:

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

What could be the cause of this problem? Thanks.

A: 

You need to have libmysqlclient15-dev package version to be equal to the version of libmysqlclient15. Do you?

FractalizeR
A: 

There is nothing obvious. I've created a table with those columns, run the index on both Mac and Windows boxes and it indexes correctly both times. I'm using sphinx 0.9.9-rc2, perhaps it's 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>
Ian