Apologies if this has already been asked somewhere else in the forum,
I couldn't come up with many juicy search terms to look for it.
I recently upgraded from TS 0.9.8 to 0.9.9 and have noticed that since
the upgrade, calling model.search doesn't actually execute the search
-- the search seems to only execute when I go on to use the results
later.
Given that my app was originally designed under the premise that a
search would take place when I called model.search, I have had a few
issues with this paradigm shift, but have fixed most of them.
The only remaining problem I have is that I want to be able to rescue
exceptions with search when they happen (i.e., if the search dameon
can't be reached). Previously, I could do this simply by wrapping my
query in a begin rescue block, but since the query doesn't take place
when calling search, the only hackaround I've been able to come up
with so far is to do something like
begin
result = Item.search("blah")
result.total_entries # force search to actually execute
rescue
end
Pretty ugly. Does anyone know of a better way to tell TS to actually
conduct the search on the line that I call it from?
Thanks,
Bill
--
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.