Thinking Sphinx is a Rails plugin that integrate SphinxSearch with Rails in an elegant way. Recently, I need to use SPH_SORT_EXPR mode of SphinxSearch in a Rails app but Thinking Sphinx don't support it. I think the reason why Thinking Sphinx don't support all SphinxSearch modes is that Pat Allan want to keep the plugin simple and easy to use so he leave advanced modes and configs out (some of them are SPH_SORT_EXPR mode, stopwords, wordforms, and exceptions configs).
Here is my code that extend ThinkingSphinx::Search class to support SPH_SORT_EXPR mode via :sort_expr option.
Feel free to tweak the code at RefactorMyCode.com
Usage: Model.search("search string", :sort_expr => "sort expression")
Find out more about my Thinking Sphinx's bug fixes and extenstions here: