sunspot/sunspot — pull request #507 by robincurry (2013-11-24 13:19:38+00:00)
Title: Accept non-string literals when ordering by function.

Currently order_by_function only accepts arguments of type Array, Symbol, or String. Since the functions often deal with math, it is natural to want to use numeric types as well. FunctionComp already does the work of converting fields to_s, so this PR changes it to more liberally accept non-string literals.