freelancing-god/thinking-sphinx — pull request #363 by hunterae (2012-06-22 21:33:33+00:00)
Title: hard_retry_count feature

Added new feature which allows searches to retry x number of times. I realize there are already options that may be specified directly to Sphinx, but these were found to be insufficient and we found ourselves still getting sphinx exceptions. This code surrounds the search and a rescue block and will retry the search x number of times.

There are two ways "x" can be defined:

Globally (in sphinx.yml):
production:
hard_retry_count: 3

Or directly on a specific search:
Model.search(:hard_retry_count => 4)