Error: No Enabled Local Indexes to Search

Matthew Vasseur's Avatar

Matthew Vasseur

21 Jun, 2012 11:19 PM

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. 1 Posted by Matthew Vasseur on 21 Jun, 2012 11:25 PM

    Matthew Vasseur's Avatar

    In case this may be an issue, here is the define_index

    define_index do

    indexes title
    indexes content
    
    set_property :delta => true
    
    if Rails.env.production?
      set_property :delta => FlyingSphinx::DelayedDelta
    end
    

    end

  2. Support Staff 2 Posted by Pat Allan on 22 Jun, 2012 04:51 AM

    Pat Allan's Avatar

    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:

    heroku config:remove FLYING_SPHINX_INGRESS
    

    Otherwise, can you let me know what type of database you're on?

    Cheers

    Pat

  3. 3 Posted by Matthew Vasseur on 22 Jun, 2012 07:13 PM

    Matthew Vasseur's Avatar

    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. Support Staff 4 Posted by Pat Allan on 22 Jun, 2012 11:23 PM

    Pat Allan's Avatar

    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. 5 Posted by Matthew Vasseur on 23 Jun, 2012 01:46 AM

    Matthew Vasseur's Avatar

    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. Support Staff 6 Posted by Pat Allan on 23 Jun, 2012 07:18 AM

    Pat Allan's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac