I'm using Sphinx Search (2.0.8) for my Rails 3.2.8 web application using the gem Thinking Sphinx (3.0.4, directly from branch master on GitHub). Lately, when I've tried to search anything I get the following error:
index group_core,project_core,user_core: query error: no field 'sphinx_internal_class_name' found in schema
Online, the advice I found was to run a rake ts:rebuild
, which I did, but the error is still appearing.
My thinking_sphinx.yml file is as follows:
development:
morphology: stem_en
enable_star: true
charset_table: "0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F"
test:
morphology: stem_en
enable_star: true
charset_table: "0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F"
production:
morphology: stem_en
enable_star: true
charset_table: "0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F"
My index files are under app>indices, and they are as follows:
group_index.rb
ThinkingSphinx::Index.define :group, :with => :active_record do
indexes :name, :sortable => true
indexes :description, :sortable => true
#has post_id, user_id, created_at, updated_at
set_property :delta => true
end
user_index.rb
ThinkingSphinx::Index.define :user, :with => :active_record do
indexes :last, :sortable => true
indexes :first, :sortable => true
indexes :preferredname, :sortable => true
indexes :email, :sortable => true
#has post_id, user_id, created_at, updated_at
set_property :delta => true
end
project_index.rb
ThinkingSphinx::Index.define :project, :with => :active_record do
indexes :name, :sortable => true
indexes :pitch, :sortable => true
#has post_id, user_id, created_at, updated_at
set_property :delta => true
end
I've searched online, and nothing I've found (rebuilding the index, upgrading to the most recent version of Thinking Sphinx, etc.) has solved this issue. Any ideas?
I'm pretty sure this bug is fixed in recent commits on the master branch. Can you try the following?
gem 'thinking-sphinx', '~> 3.0.5',
:git => 'git://github.com/pat/thinking-sphinx.git',
:branch => 'master',
:ref => '41a248c926'