Search code examples
rubyruby-on-rails-3delayed-jobthinking-sphinx

What is the equivalent of 'index_delta' in Thinking Sphinx v3?


This question is related to this one: Using Delta Indexes for associations in Thinking Sphinx

I have exactly the same dilemma right now. I tried the solution posted by Pat and Claudio but no luck since I'm using Thinking Sphinx version 3.0.6.

I'm using ts delayed delta gem as well.


Solution

  • This is covered here: https://github.com/pat/thinking-sphinx/issues/780 - but the short answer is:

    ThinkingSphinx::Deltas::IndexJob.new('product_delta').perform
    

    If you want to queue it up in Delayed Job, though, then the following is what you're after:

    Delayed::Job.enqueue(
      ThinkingSphinx::Deltas::DelayedDelta::DeltaJob.new('product_delta')
    )