Hi Steve

Even without deltas, Thinking Sphinx will try to update any 
integer/boolean/timestamp attributes (generally running with the some-updates 
are better than no-updates), as Sphinx allows for this. So this is why the 
calls are being made...

However, I'm a little confused as why it's trying to update sphinx_internal_id 
- that's just an attribute of the primary key of the model, which obviously 
does not change, unless you're doing something really odd?

That said, it's an integer attribute, and so should be fine to update... do you 
have a config/sphinx.yml file, and if so, what's in it? Also, are you running 
Sphinx with the same user that the Rails app is running with? (that is, the 
owner of the app files if you're using Passenger).

-- 
Pat

On 19/08/2010, at 2:27 PM, Steve H wrote:

> We recently have been making an effort to managing our dependencies
> with Bundler in our Rails 2.3.2 app.
> 
> About 6 months ago we implemented ThinkingSphinx, and have been very
> happy with it thus far.
> 
> Strangely, after we deployed our Bundler release to our QA
> environment, we started seeing errors like the one below whenever we
> try to save or update a record of indexed model.
> This is strange because we never setup delta indexing, so I would not
> expect any sphinx-related callbacks to be executed on saves/updates/
> destroys/creates.
> 
>>> a.save
> Riddle::ResponseError: searchd error (status: 1): index address_core:
> attribute 'sphinx_internal_id' can not be updated (must be boolean,
> integer, timestamp, or MVA)
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> riddle-1.0.8/lib/riddle/client.rb:582:in `request'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> riddle-1.0.8/lib/riddle/client.rb:384:in `update'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:26:in `update_attribute_values'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:19:in `each'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:19:in `update_attribute_values'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in `send'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in
> `evaluate_method'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:166:in `call'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:93:in `run'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `each'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `send'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `run'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:276:in
> `run_callbacks'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/callbacks.rb:344:in `callback'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:129:in `send'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:129:in
> `trigger_after_commit_callbacks'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:128:in `each'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:128:in
> `trigger_after_commit_callbacks'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:36:in `commit_db_transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/connection_adapters/abstract/
> database_statements.rb:159:in `transaction_without_callback'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:12:in `transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:182:in
> `transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:228:in
> `with_transaction_returning_status'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:208:in
> `rollback_active_record_state!'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
> 
> class Address < ActiveRecord::Base
>  define_index do
>    indexes business(:name), :as => :name, :sortable => true
>    indexes business.categories_and_tags(:name), :as => :category
>    indexes :city_id, :type => :integer
>    indexes zip_code
> 
>    has business.categories_and_tags(:id), :as => :category_id
>    has "RADIANS(lat)",  :as => :latitude,  :type => :float
>    has "RADIANS(lon)", :as => :longitude, :type => :float
>    has 'city_id', :as => 'city', :type => :integer
>    has "COUNT(business.reviews.id)", :as => :review_count, :type
> => :integer
>    has "CEIL(1/business.merchant.merchant_id)", :as
> => :claimed, :type => :integer
>    has "CEIL(1/business.cs_customer.available_cap)", :as
> => :available_cap, :type => :integer
>  end
>  # etc ...
> end
> 
> -Steve
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/thinking-sphinx?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to