Hi there
Trying to get Flying Sphinx working for the past few hours, getting nowhere.
Gems:
thinking-sphinx 2.0.12
flying-sphinx 0.6.5
riddle 1.5.2
First I tried to specify version 2.0.4 in the sphinx.yml file. That is what I have installed locally, so wanted to replicate that. But keep running into this error:
Riddle::ResponseError (searchd error (status: 1): client version is higher than daemon version (client is v.1.25, daemon is v.1.23)):
Did some searching, there were a couple of threads on that error, one about needing to change the version, or updating gems. I'm not sure whether 2.0.4 is supported, but if not would be nice to have a list of which versions are available. Anyway, changed version to 2.1.0 in sphinx.yml, followed by heroku run rake fs:rebuild etc. No luck, now keep getting another useless error:
ThinkingSphinx::SphinxError (no enabled local indexes to search)
Did some searching on that, seems to usually be a problem with the index definition. But rake ts:rebuild works fine locally (using Sphinx 2.0.4 if that makes any difference), it indexes and searches fine. I've tried running heroku run rake fs:rebuild, doesn't help. Tried reverting back to 2.0.4 in sphinx.yml, just goes back to the first error about client versions.
Any ideas?
#1 Posted by adrian on 15 May, 2012 06:54 AM
Also - Heroku app is blooming-mist-9229.herokuapp.com if that's helpful
#2 Posted by Pat Allan Support staff on 15 May, 2012 07:02 AM
Hi Adrian
From what I can see, when you're indexing data there's an error with the indexing process. You should be getting email notifications of this (if you're not, let me know).
What's the index definition for your Room model? It seems something's not quite right there.
And yes, you'll want to use 2.1.0 in your sphinx.yml file for production, as Flying Sphinx at this point does not have 2.0.4 installed on its servers.
Cheers
Pat
#3 Posted by adrian on 15 May, 2012 07:16 AM
Hi Pat
Thanks, appreciate the quick response. I did just now see the emails, did't see an error in the console or anything so figured the index was working fine.
I see where it's getting caught up now, on a MVA SQL fragment which I just converted to PostgreSQL. I have no idea why it's working fine locally, maybe a different version.
Basically, it creates a list of unix date stamps which a room is already booked for. Seems to be getting caught up on the array_agg() bit, think I need to do some more research unless you can see an easy way around it:
In MySQL the code snippet was:
Thanks for your help :)
#4 Posted by Pat Allan Support staff on 15 May, 2012 07:22 AM
I think the issue is that array_agg expects strings only, not integers or floats, so you'll need to cast the timestamps to strings within that array_agg call. PostgreSQL's functions can be a bit fussier than MySQL.
#5 Posted by adrian on 15 May, 2012 07:51 AM
Ah, ok turns out the underlying issue is that the Heroku shared database is running an ancient version of PostgreSQL, which doesn't support array_agg(). Guess I'll have to find another way around this one..
Thanks again for your help, will let you know if I get anywhere with it.
#6 Posted by adrian on 15 May, 2012 09:54 AM
Installed the new free PostgreSQL 9.1 addon which appears to have been released a couple weeks ago. All working now :)
http://blog.heroku.com/archives/2012/5/1/heroku_s_new_free_postgres...
#7 Posted by Pat Allan Support staff on 15 May, 2012 10:02 AM
Ah, fantastic :)
Pat Allan closed this discussion on 15 May, 2012 10:02 AM.