Search code examples
ruby-on-rails-3rspecthinking-sphinx

How to test Thinking Sphinx delta indexes using rspec


I have used Thinking sphinx in my project and have test cases using Rspec for my search functionalities using setup similar to here

I have also used extensive Delta indexing in my project. How can I test my delta indexed results using rspec here.


Solution

  • Issue was due to https://github.com/pat/thinking-sphinx/issues/148 (delta indexing is by default disabled in rspec test cases)

    I had to set the following flags true to run the test cases:

    ThinkingSphinx.deltas_enabled  = true
    ThinkingSphinx.updates_enabled = true