Skip to content

Problems with thinkingsphinx index updates #239

@shoresh

Description

@shoresh

The thinkingsphinx gem is used to connect rails model with the sphinx search engine. We are using realtime indexes which require that a call be made when the data changes to update the index. We have placed that call in both the after_save method of the model as well as in the on_transition hook of the workflow engine:

  on_transition do |from, to, triggering_event, *event_args|
    unless from == to
      ThinkingSphinx::RealTime.callback_for(:scapp)
    end
  end

It looks like this callback is not working. If we change another column in the record the index is updated. In other words, the after_save hook is working. If we only change the status field in the record (through the workflow transition) the record is not updated. In this case we can see in the log that the index update occurs before the status is changed by the workflow engine. Do you have any advice for how to correct this problem? Are we doing something wrong?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions