I wrestled with this issue for a while and came up with a solution that
will suit some people, depending on the use case. Pat was kind enough to
merge it, so if it suits you it's available to use.
The search() method accepts a sql_order option, which will order the
matching results based on a field in your database instead of a field
in the sphinx index. If you're trying to sort by a string and you're
getting delta index records followed by main index records, this may
suit you.
An example from my codebase:
Edition.search("some keywords", :sql_order => "`title`", :limit => 1000)
The one caveat is that the ordering is done on a per page basis. For a
HTML interface with pagination this behaviour is probably not what you
want.
In my case the search is for an order form with up to 1000 products, so
I'm not using pagination and the ordering is appropriate.
-- James Healy <jimmy-at-deefa-dot-com> Wed, 11 Mar 2009 16:17:50 +1100