To be honest, I'm not entirely sure why the first attempt fails, but I believe
it's to do with persistent connections and changes to the index files - I think
connections only know about records that existed when the connection was
opened. After the exception is raised, the connection is closed and re-opened
(and is now aware of the new records), then the query runs again and is
successful.
As for other delta options: ts-resque-delta exists but doesn't yet support TS
v3, and the official gem releases of ts-sidekiq-delta don't support TS v3
either.
However, I've forked the latter and have it running in a couple of TS v3 apps
without issues:
gem 'ts-sidekiq-delta',
:git => 'git://github.com/pat/ts-resque-delta',
:branch => 'sidekiq', # the original was forked from ts-resque-delta
:ref => '5bae80758c'
And use ThinkingSphinx::Deltas::SidekiqDelta for the :delta argument. It also
works smoothly with Flying Sphinx as well, but does not work with Thinking
Sphinx v1/v2 releases.
I'm hoping ts-resque-delta will be updated soon to work with TS v3 - Aaron is
super helpful with that gem and open to patches, but there is a bit of work
involved in the switch. I've discussed a bit of that here:
https://github.com/agibralter/ts-resque-delta/issues/23
--
Pat
On 12/05/2013, at 2:06 AM, Tair Assimov wrote:
> Thanks Pat. You are helpful as usually :)
>
> Ok, I will try what you suggested with DelayedDelta. Btw, do you know if
> there are Redis/Resque based implementations available?
>
> Regarding the errors in the tests, I wonder though, why the first attempt
> fails?
>
> Cheers.
>
> On Saturday, May 11, 2013 at 4:19 PM, Pat Allan wrote:
>
>> Hi Tair
>>
>> For Delayed Deltas, you'll need to use the latest release of
>> ts-delayed-deltas (2.0.0), and instead of :delayed, use
>> ThinkingSphinx::Deltas::DelayedDelta.
>>
>> For that error message, it'd be better if I had that appearing in the logs,
>> rather than to STDOUT - but the fact that the tests still pass indicates the
>> first attempt of running it failed, but the second attempt passed. So, it's
>> safe to ignore.
>>
>> I'll have to get a patch in to change that output.
>>
>> --
>> Pat
>>
>> On 11/05/2013, at 10:15 PM, Tair wrote:
>>
>>> Hi all.
>>>
>>> I finally upgraded to 3.0.3 from 2.0.13. Everything seems to work, however
>>> I had to remove "set_property delta: :delayed" and use "delta: true" in the
>>> new indices file. Moreover, I had to use "0.3.12b6" version of mysql2 gem.
>>>
>>> Does anyone have ideas on how to make the delayed deltas work with 3.0.3?
>>> Looks like the documentation has not been updated yet:
>>> http://pat.github.io/thinking-sphinx/deltas.html Or is there a workaround
>>> for delayed deltas? Does anyone use cron jobs or something to rotate
>>> indices? How often? Please share.
>>>
>>> Another problem I have is with tests. The tests pass, application works
>>> fine and I get the correct search results, but there are this kind of
>>> errors for each test using ThinkingSphinx:
>>>
>>> Error with statement: UPDATE property_core SET sphinx_deleted = 1 WHERE id
>>> = 408
>>>
>>> Here is an example controller test I have:
>>>
>>> it 'should find all properties with atom' do
>>> ThinkingSphinx::Test.run do
>>> get :index, format: :atom
>>> assigns(:properties).size.should eql(2)
>>> end
>>> end
>>>
>>> Any ideas?
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Thinking Sphinx" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Thinking Sphinx" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/thinking-sphinx/XekqL-zCWA4/unsubscribe?hl=en.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.