Hello,
I've recently added flying_sphinx:wooden to my heroku app. However,
ever since doing an error and this appears in the heroku logs:
ActionView::Template::Error (no enabled local indexes to
search)
I'm not really sure what this means, but my Flying_Sphinx dashboard
says running. I looked into the "Index Requests" section and
clicked View Log and saw this (if it is any help)
Sphinx 1.10-beta (r2420)
Copyright (c) 2001-2010, Andrew Aksyonoff
Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file
'/mnt/local/flying-sphinx/6906a24ad7cc11ba5/sphinx.conf'...
indexing index 'report_core'...
ERROR: index 'report_core': sql_connect: could not connect to
server: Connection timed out
Is the server running on host "ec2-23-23-227-54.compute-1.amazonaws.com" (10.127.98.135) and accepting
TCP/IP connections on port 5432?
(DSN=pgsql://akcenxdulb:***@ec2-23-23-227-54.compute-1.amazonaws.com:543...).
total 0 docs, 0 bytes
total 189.441 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'report_delta'...
ERROR: index 'report_delta': sql_connect: could not connect to
server: Connection timed out
Is the server running on host "ec2-23-23-227-54.compute-1.amazonaws.com" (10.127.98.135) and accepting
TCP/IP connections on port 5432?
(DSN=pgsql://akcenxdulb:***@ec2-23-23-227-54.compute-1.amazonaws.com:543...).
total 0 docs, 0 bytes
total 189.439 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'report'...
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
I think that it is not even indexing (ERROR: index 'report_delta': sql_connect: could not connect to server) due to some server error, but am clueless as to why.
Thanks.
#1 Posted by Matthew Vasseur on 21 Jun, 2012 11:25 PM
In case this may be an issue, here is the define_index
define_index do
end
#2 Posted by Pat Allan Support staff on 22 Jun, 2012 04:51 AM
Hi Matthew
Are you using Heroku's default shared database? If so, have you set FLYING_SPHINX_INGRESS to true? Because that setting's only for databases that allow external ingress - and Heroku's default shared databases do not (yet) do that. So, if this is the situation, you'll need to remove that setting:
Otherwise, can you let me know what type of database you're on?
Cheers
Pat
#3 Posted by Matthew Vasseur on 22 Jun, 2012 07:13 PM
Thank you, I've got it working now.
On another note (Maybe I need to make a new discussion, as it is away from this topic), I would like to implement real-time search into my heroku app. Currently Flying_Sphinx is only able to search me reports that have been indexed (I am indexing every 10 minutes), so one must wait at most 10 minutes before viewing their report in the feed.
Is there a way to make them be searchable automatically? Locally I'm using deltas, and have been looking into DelayedDelta for Heroku (as you can tell, my define_index is setup for delayed_delta) but it doesn't seem to be working. I enabled a worker (which I currently disabled due to the cost and the fact that it wasn't working as intended) and it still was not able to find just-made reports. If it is of any help, I am using flying_sphinx:wooden.
Once again, thanks for the quick response.
#4 Posted by Pat Allan Support staff on 22 Jun, 2012 11:23 PM
Hi Matthew
Great to hear standard indexing's working smoothly now.
Unfortunately, delta indexing is not enabled for the Wooden Sphinx plan - it's not viable, given the extra resources it would consume with the increase in indexing requests. All other plans allow for it, though (the higher price allows for higher spec'd machines, essentially).
If you do decide to upgrade, then that should provide near-real-time results (there will be a slight delay as your worker gets to processing the request, and the same applies for my indexing workers). I realise it's not cheap, but at this point in time, there's not really any better options.
Cheers
Pat
#5 Posted by Matthew Vasseur on 23 Jun, 2012 01:46 AM
Thank you for the quick response.
So, just to be clear, if I upgrade will flying_sphinx realtime index on its own? Or will I still have to implement the delta through Delayed_Job?
#6 Posted by Pat Allan Support staff on 23 Jun, 2012 07:18 AM
Hi Matthew
You'll still need to use Delayed Job (or Resque, using the ts-resque-delta gem) for the deltas to be processed - you don't want indexing to happen as part of the web request, otherwise it'll take several seconds or more to get back to the user (or time out, as Heroku has a 30 second limit).
Pat