Set up Sphinx (2.0.4, Ubuntu 14.04 LTS) on my test forum in sphinxql mode. Seems to be working generally, search from Elkarte doesn't work - in error log I get get this syntax error:
sphinxql: syntax error, unexpected WEIGHT, expecting IDENT (or 11 other tokens) near 'weight() + (relevance/1000)) rank FROM elkarte_index WHERE MATCH('aeroplane') AND id_board IN (1) GROUP BY id_topic WITHIN GROUP ORDER BY rank DESC, poster_time DESC ORDER BY rank DESC, poster_time DESC LIMIT 0,2000 OPTION field_weights=(subject=3000,body=1000)'
I'll try the other method.
So - it works using phpapi.php method.
I use the sphinxql interface on 14.04, but its with version Sphinx 2.1.9. I see 2.2.5 is out so I should try it against that as well.
I left the api version in place along with the QL as the api is generally a stable interface, but whats available or not in the QL interface gets pretty confusing, at least for me. The api is a good backup plan and you can get in to endless discussions of which is better or not so I'd rather not.
Could you try updating the version you are running as see if that works?
Sure - to 2.2.5?
Try Sphinx 2.1.9 first ... that works for me so I want to narrow down if its a Sphinx version incompatibility or a query problem that I've not seen.
Thanks for your assistance.
Just to update on this, I found the cause to the problem for the 2.0 branch of sphinx and made a PR to fix this, the fix appears to work fine in both 2.1 and 2.2 from my testing.
Thats from 2.0, The key there is in the ()'s which means in 2.0 you can't just use WEIGHT() but have to do a WEIGHT() weight and then use that alias weight in the query. Fortunately the alias thing works fine in 2.1+ so the same query can be used.