Aloha everyone,
I just encountered a very odd bug in TS. First, the code that is
throwing the error has been working perfectly up to this point. The
error started after I upgraded to the latest version of TS where Pat
changed the ThinkingSphinx::Collection code to
ThinkingSphinx::Search.
The bug happens when you use Rails caching.
If you have something like this:
sphinx_ids = Rails.cache.fetch(%Q!#{search_string}!)
{ sphinx.search_for_ids q, :with => filters, :order => opts
[:order], :include => opts[:include] }
This returns a valid ThinkingSphinx::Search object the first time. On
all subsequent calls, however it returns an Array. Thus, any calls to
TS methods (like results) will bomb.
I haven't yet had the time to dig through this to find the cause. Does
anyone have an idea why Rails.cache.fetch worked fine with the old
TS::Collection code but bombs with the new TS::Search code?
Thanks!
DrMark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---