I Can’t answer my own question yet, so here is the answer
I’m an idiot… didn’t reindex every time.
searchd --stop
indexer --all
searchd
Problem solved. Sorry for wasting anyone’s time 🙁 Hope this helps someone.
** End of answer **
I have a PHP model running a Query against an indexed table (call it SONGS).
The query in the sphinx.conf is as follows:
sql_query = \
SELECT \
songs.id AS song_id, \
songs.title AS song_title, \
songs.upload_stamp AS song_published, \
songs.uri AS song_uri, \
songs.artist_id, \
songs.song_rank, \
songs.vote_count \
FROM songs
However, when i run the code to execute the query, the resulting array only contains the 2 fields song_published & artist_id, and is missing the other 6 fields.
The php code looks as follows:
$this->cl->SetMatchMode(SPH_MATCH_ALL);
$this->cl->SetConnectTimeout ( 1 );
$this->cl->SetArrayResult ( true );
$this->cl->SetWeights ( array ( 100, 1 ) );
$result = $this->cl->Query($this->search_term,'song-index');
I’ve tried a multitude of things, and restarted searchd (edit and reindexed) each time to no avail.. it is returning the correct results, but only 2 of the 8 fields in the resulting array.
Any help would be MUCH appreciated!!!!
EDIT…
Here are the declarations for the values as well
sql_attr_uint = artist_id
sql_attr_uint = song_id
sql_attr_uint = vote_count
sql_attr_timestamp = song_published
sql_attr_float = song_rank
sql_attr_string = song_uri
sql_attr_string = song_title
I’m an idiot… didn’t reindex every time.
searchd –stop
indexer –all
searchd
Problem solved. Sorry for wasting anyone’s time 🙁 Hope this helps someone.