wbharding wrote:
> 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?
I'm not sure how to stop TS lazy evaluating the search, there is a neat
way to catch sphinx connection exceptions. Add the following to your
ApplicationController, and you won't need to wrap each search call in a
rescue block (unless you need to display a custom error for each search).
rescue_from ThinkingSphinx::ConnectionError, :with =>
:sphinx_connection_error
# method for handling the Sphinx daemon being unavailable. We don't
# want to let it filter through to the default 500 page, as it isn't
# a major issue, and can be easily fixed.
def sphinx_connection_error
render :template => 'errors/sphinx_connection.html.erb', :status => 500
end
-- James Healy <[email protected]> Wed, 13 Jan 2010 14:24:33 +1100
--
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.