tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/36219-delete_all-is-failing-with-v120Flying Sphinx: Discussion 2018-08-27T13:17:28Ztag:support.flying-sphinx.com,2011-01-05:Comment/459736472018-08-27T12:02:57Z2018-08-27T12:02:57Zdelete_all is failing with v1.2.0<div><p>Hi Miika</p>
<p>Ideally, I’d recommend upgrading thinking-sphinx to v4.0.0 and flying-sphinx to 2.1.2, because that’s going to be far more reliable with Rails 5.x. The changelogs and release notes are pretty thorough about any potential issues:<br>
<a href="https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown">https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown</a> <a href="https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown">https://github.com/pat/thinking-sphinx/blob/develop/CHANGELOG.markdown</a><br>
<a href="https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0">https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0</a> <a href="https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0">https://github.com/pat/thinking-sphinx/releases/tag/v3.4.0</a><br>
<a href="https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0">https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0</a> <a href="https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0">https://github.com/pat/thinking-sphinx/releases/tag/v4.0.0</a><br>
<a href="https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGELOG.markdown">https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGEL...</a> <a href="https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGELOG.markdown">https://github.com/flying-sphinx/flying-sphinx/blob/develop/CHANGELOG.markdown</a></p>
<p>Particularly in the case of flying-sphinx, I would expect upgrading to be a pretty simple affair. TS might be a little more complicated depending on how you’re using it.</p>
<p>The flying-sphinx 1.x releases currently support Rails 2.x-4.x, and nominally 5.x, but as you’ve found out, this only works to a point. The patch supplied in the other conversation you’ve linked to will break Rails 2.x support - which I know is not really a big deal, but I’d rather keep the 1.x releases of flying-sphinx happy with those old Rails versions.</p>
<p>Certainly, as a workaround you could fork flying-sphinx and apply this commit, and then you’ve got a version that works for you without going through the upgrading:<br>
<a href="https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa36600dcf543b5cac598856f42e1">https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa...</a> <a href="https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa36600dcf543b5cac598856f42e1">https://github.com/flying-sphinx/flying-sphinx/commit/e1a1af4de52aa36600dcf543b5cac598856f42e1</a></p>
<p>But from a long-term perspective, upgrading the gems is definitely the better approach if you’ve got the time.</p>
<p>If you get stuck with any of this, do let me know.</p>
<p>Regards,</p>
<p>— Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/459736472018-08-27T12:46:28Z2018-08-27T12:46:28Zdelete_all is failing with v1.2.0<div><p>Thanks for the quick reply!<br>
I went with the fork option for now... was stuck for a while (not running "bundle install" locally to generate a new Gemfile.lock before pushing to Heroku). But I think it's working now.</p>
<p>Off-topic and maybe a dumb question but on Heroku is fs:index and ts:index aliases? Should one prefer one over the other? Thanks again.</p></div>miikatag:support.flying-sphinx.com,2011-01-05:Comment/459736472018-08-27T12:56:06Z2018-08-27T12:56:06Zdelete_all is failing with v1.2.0<div><p>It’s not a dumb question at all!</p>
<p>If you’re using flying-sphinx 1.x or earlier, then you should use <code>fs:index</code>. It’s only since v2 that <code>ts:index</code> performs as expected no matter where you’re running it. Really, I should have taken this approach from the very beginning, because it’s been a source of confusion for a long time.</p>
<p>But yes: flying-sphinx < v2: use <code>fs:index</code>. flying-sphinx >= v2: use <code>ts:index</code>.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/459736472018-08-27T13:17:26Z2018-08-27T13:17:26Zdelete_all is failing with v1.2.0<div><p>Wow, thanks for the heads up!<br>
Really glad I asked :)</p></div>miika