【发布时间】:2023-12-22 18:10:01
【问题描述】:
我在我的项目中使用了 Thinking sphinx,并使用 Rspec 为我的搜索功能使用 setup similar to here 测试用例
我还在我的项目中使用了广泛的 Delta 索引。如何在此处使用 rspec 测试我的 delta 索引结果。
【问题讨论】:
标签: ruby-on-rails-3 rspec thinking-sphinx
我在我的项目中使用了 Thinking sphinx,并使用 Rspec 为我的搜索功能使用 setup similar to here 测试用例
我还在我的项目中使用了广泛的 Delta 索引。如何在此处使用 rspec 测试我的 delta 索引结果。
【问题讨论】:
标签: ruby-on-rails-3 rspec thinking-sphinx
问题是由 https://github.com/pat/thinking-sphinx/issues/148 引起的(在 rspec 测试用例中默认禁用增量索引)
我必须将以下标志设置为 true 才能运行测试用例:
ThinkingSphinx.deltas_enabled = true
ThinkingSphinx.updates_enabled = true
【讨论】: