I’ve got a few tables that literally only hold integers, no “words” and for some reason Sphinx is unable to hold this data in it’s library. Just returns “0 bytes” errors for these indexes.
Is it possible to do this? If so, how? Below is an example from my Sphinx.conf for one that fails.
source track
{
type = mysql
sql_host = host
sql_user = user
sql_pass = pass
sql_db = db
sql_port = port
sql_query = SELECT id, user, time FROM track;
sql_attr_uint = user
sql_attr_uint = time
sql_query_info = SELECT * FROM track WHERE id=$id
}
index track
{
source = track
path = /var/lib/sphinx/track
docinfo = extern
charset_type = utf-8
min_prefix_len = 1
enable_star = 1
}
You can do it but sphinx has an odd error where you must return in the query more records than you have attributes. If you alter your SQL to be:
That should work. I’ve seen something similar and not sure what the “official” reason is but duping the id column seemed to do the job.