no enabled local indexes to search

Phil McClure's Avatar

Phil McClure

01 Dec, 2011 02:20 PM

Hi,

I'm getting this error when trying to perform a search. Here are the version details

rails - 2.3.14
ruby 1.8.7

thinking-sphinx - 1.4.9
flying-sphinx - 0.5.1
riddle - 1.3.3

This is the output from 'heroku rake fs:rebuild':
SQL (0.7ms) SET client_min_messages TO 'panic' SQL (0.8ms) SET standard_conforming_strings = on SQL (0.8ms) SET client_min_messages TO 'warning' ActiveScaffold: extending RESTful routes for pages
Stopping Sphinx...
Stopped Sphinx
Starting Index Request
SQL (0.8ms) begin SQL (0.7ms) savepoint ts SQL (0.0ms) PGError: ERROR: function "array_accum" already exists with same argument types : CREATE AGGREGATE array_accum (anyelement) ( sfunc = array_append, stype = anyarray, initcond = '{}' );

SQL (0.7ms) rollback to savepoint ts SQL (0.7ms) release savepoint ts SQL (0.7ms) commit Index Request has completed.
Starting Sphinx...
Started Sphinx

Application Trace:
/app/.bundle/gems/ruby/1.8/gems/thinking-sphinx-1.4.9/lib/thinking_sphinx/search.rb:415:in populate' /app/.bundle/gems/ruby/1.8/gems/thinking-sphinx-1.4.9/lib/thinking_sphinx/search.rb:560:incall' /app/.bundle/gems/ruby/1.8/gems/thinking-sphinx-1.4.9/lib/thinking_sphinx/search.rb:560:in retry_on_stale_index' /app/.bundle/gems/ruby/1.8/gems/thinking-sphinx-1.4.9/lib/thinking_sphinx/search.rb:402:inpopulate' /app/.bundle/gems/ruby/1.8/gems/thinking-sphinx-1.4.9/lib/thinking_sphinx/search.rb:167:in method_missing' /app/app/controllers/job_titles_controller.rb:121:inoccupation_titles'

Any ideas?

Thanks,
Phil

  1. Support Staff 2 Posted by Pat Allan on 01 Dec, 2011 02:26 PM

    Pat Allan's Avatar

    Hi Phil

    Not sure why this is happening - what's the app name, so I can have a look on the FS servers?

    Also, you may want to upgrade gems - give TS 1.4.10, FS 0.6.1 and Riddle 1.5.0 a shot. No idea if that's related, but it certainly won't make things worse.

    Pat

  2. 3 Posted by Phil McClure on 01 Dec, 2011 02:35 PM

    Phil McClure's Avatar

    Hi Pat,

    The heroku app name is 'resumecompanion-staging-rails2'.

    In the meantime, I'll try updating the versions, as you suggested.

    Thanks!

    Phil

  3. 4 Posted by Phil McClure on 01 Dec, 2011 02:37 PM

    Phil McClure's Avatar

    Still the same issue with the updated versions.

  4. Support Staff 5 Posted by Pat Allan on 01 Dec, 2011 02:41 PM

    Pat Allan's Avatar

    Hi Phil

    While index processing is occurring, Sphinx is failing with your current index definition - you should be receiving emails about this at [email blocked]. If you can share the index definition in your Occupation model, I can try to help debug things.

  5. 6 Posted by Phil McClure on 01 Dec, 2011 03:02 PM

    Phil McClure's Avatar

    Thanks Pat, I got my college to forward those emails to me.

    Here is the index def:-

    define_index do

    indexes :title, :sortable => true
    indexes :description       
    indexes lay_titles.title, :as => :lay_title                                                                                                                                          
    indexes tasks.statement, :as => :task_statement
    indexes emerging_tasks.statement, :as => :emerging_task_statement
    indexes occupation_detailed_work_activities.detailed_work_activities.title, :as => :detailed_work_activity_title
    indexes job_family.title, :as => :job_family_title
    indexes related_occupation_data.related_occupations.title, :as => :related_occupation_title
    indexes related_occupation_data.related_occupations.description, :as => :related_occupation_description
    
    has tasks(:onet_soc_code_id), :as => :task_ids
    

    end

  6. Support Staff 7 Posted by Pat Allan on 01 Dec, 2011 03:11 PM

    Pat Allan's Avatar

    Thanks Phil - from what I can tell, I think it's related to the last two fields, from the related_occupation_data association. Do the associations and columns for those two fields exist? Are those changes/migrations on the server? Is any polymorphism involved?

  7. Support Staff 8 Posted by Pat Allan on 01 Dec, 2011 03:50 PM

    Pat Allan's Avatar

    Hi Phil

    Just so you're aware, due to timezones and sleep I'll be offline for a while, so won't be able to respond so promptly. Looks like you've got it working though - I'm guessing those two fields have been removed? Any idea why they were causing problems?

  8. 9 Posted by Phil on 05 Dec, 2011 09:51 PM

    Phil's Avatar

    Thanks a lot for your help Pat. It was actually the 'tasks' line that was causing the issue:-

    indexes tasks.statement, :as => :task_statement
    

    I've just got it commented out at the minute. Not sure what was causing the issue but it seems to be something with that relationship. I'll report back if I track it down.

    Thanks again!

  9. Pat Allan closed this discussion on 26 Dec, 2011 09:23 AM.

Comments are currently closed for this discussion. You can start a new one.

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