Hi Emil Sphinx can update _attributes_ in indexes (but not fields - hence why some people use delta indexes) - and there's an attribute, created by Thinking Sphinx, called sphinx_deleted. This gets set to true when a model is deleted, so it won't get returned in future results (otherwise pagination counts are inaccurate).
Cheers -- Pat On 06/10/2008, at 9:12 PM, Emil Tin wrote: > > Hi! > > I'm gettting the error 'Connection to Sphinx Daemon (searchd) failed' > whenever I try to delete any of my indexed models. > > It's true that the sphinx server is not running. But delta indexing is > not turned on, so why would TS try to connect to the sphinx server > when destroying a model? > > none of my models include :delta => true. They only contain trivial > things like: > > define_index do > indexes :name > indexes :description > end > > > > > trace: > vendor/plugins/thinking-sphinx/lib/thinking_sphinx/search.rb:231:in > `search_for_id' > vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/ > search.rb:43:in `search_for_id' > vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record.rb: > 121:in `in_core_index?' > vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record.rb: > 137:in `toggle_deleted' > vendor/rails/activesupport/lib/active_support/callbacks.rb:173:in > `send' > vendor/rails/activesupport/lib/active_support/callbacks.rb:173:in > `evaluate_method' > vendor/rails/activesupport/lib/active_support/callbacks.rb:161:in > `call' > vendor/rails/activesupport/lib/active_support/callbacks.rb:93:in `run' > vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in > `each' > vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in > `send' > vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in `run' > vendor/rails/activesupport/lib/active_support/callbacks.rb:272:in > `run_callbacks' > vendor/rails/activerecord/lib/active_record/callbacks.rb:298:in > `callback' > vendor/rails/activerecord/lib/active_record/callbacks.rb:290:in > `destroy_without_transactions' > vendor/rails/activerecord/lib/active_record/transactions.rb:102:in > `destroy_without_after_commit_callback' > vendor/rails/activerecord/lib/active_record/connection_adapters/ > abstract/database_statements.rb:66:in `transaction' > vendor/rails/activerecord/lib/active_record/transactions.rb:79:in > `transaction' > vendor/rails/activerecord/lib/active_record/transactions.rb:98:in > `transaction' > vendor/rails/activerecord/lib/active_record/transactions.rb:102:in > `destroy_without_after_commit_callback' > vendor/plugins/thinking-sphinx/lib/thinking_sphinx/active_record/ > delta.rb:58:in `destroy' > app/controllers/bands_controller.rb:236:in `destroy' > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
